<?php
	
	namespace App\Http\Model;
	use Illuminate\Database\Eloquent\Model;
	use DB;
	use Auth;
	class CustomerModel extends Model
	{
		public function CustomerPermission($id)
	 	{
		    $QModules=DB::table('modules')->select('Mid')->where('mUrl',$id['url'])->first();
			$Mid=$QModules->Mid;
			return $Qpermission=DB::table('permission')->where('Mid',$Mid)->first();
		}
		public function CustomerView()
	 	{
		    return $CustomerView=DB::table('cst_customer')
			->leftjoin('cmp_company','cmp_company.cmp_id','=','cst_customer.cmp_id')
			->where('cst_type','<>','Seller')
			->where('cst_status','=','Active')
			->get();
		}
		
	}	