<?php
	
	namespace App\Http\Model;
	use Illuminate\Database\Eloquent\Model;
	use DB;
	use Auth;
	class CompanyModel extends Model
	{
		
		public function QutationPermission($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 purchaseeditcompanyUpdate($id)
	 	{
		  return $update=DB::table('cmp_company')->where('cmp_id',$id['cmp_id'])->update(['cmp_type'=>$id['companytype'],'cmp_name'=>$id['companyname'],'cmp_description'=>$id['description'],'cmp_status'=>$id['status']]);
			
		}
		
	}
	
