<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use App\Salesmna;

class Salesman extends Model
{
    protected $table = 'ms_salesman';
	protected $primaryKey = 'id';
	
	public static function cekSalesman($id){
		return Salesman::where('user_id',$id)->first();
	}
	
	public function get_area(){
	    return $this->belongsTo('App\Area', 'sales_area');
	}
	
}
