<?php
namespace App\model;
use Illuminate\Database\Eloquent\Model;
class UserProductFav extends Model
{ // protected $visible = ['name', 'Phone'];
//
// protected $hidden = ['city','Cities','Dealers','dealer_id'];
protected $appends = ['Productinfo'];
public function getProductinfoAttribute()
{//$this->id
$Product = Products::
where('id', $this->proudctID)->
get();
return $Product;
}
// public function Cities()
// {
// return $this->hasOne('App\model\Cities' ,'id', 'city');
// // ->select(app('App\model\Cities')->getTable().'.name');
// }
// public function getShopCityAttribute()
// {
// return $this->Cities;
// }
// public function getProductCountAttribute()
// {
// $Products = Products:: where('shop', $this->id)->get();
// return count($Products) ;
// }
// public function Dealers()
// {
// return $this->hasOne('App\model\Customer' ,'id', 'dealer_id');
// // ->select(app('App\model\Customer')->getTable().'.first_name','.last_name');
// }
// public function getDealerAttribute()
// {
// return $this->Dealers;
// }
}