<?php

namespace App;
use App\Product;

use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    protected $table = 'ms_product';
	protected $primaryKey = 'id';
	
	public static function cekProduct($id){
	    return Product::find($id);
	}
	
	public function get_category(){
	    return $this->belongsTo('App\Category', 'cat_id');
	}
	
	public function get_supplier(){
	    return $this->belongsTo('App\Supplier', 'supp_id');
	}
}
