✏️ Edit: UserProductFav.php
Path:
/home/thiqat5/dex.thiqatech.com/model/UserProductFav.php
Size: 1.27 KB · Modified: 2021-11-03 20:28:12 · Perm: 0644 · Writable
← Back to directory
👁 View
⬇ Download
<?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; // } }
💾 Save
Cancel
Save as UTF-8, newlines normalized to LF