/
home
/
sjslayjy
/
public_html
/
devlok
/
app
/
Upload File
HOME
<?php namespace App; use Illuminate\Database\Eloquent\Model; class ByRoad extends Model { public function session(){ return $this->belongsTo('\App\Session'); } public function product_company(){ return $this->belongsTo('\App\ProductCompany'); } public function tokens(){ return $this->hasMany('\App\Token','by_road_id')->with('product_loadings'); } public function by_road_products(){ return $this->hasMany('\App\ByRoadProduct','by_road_id')->with('product'); } public function rake_allotments(){ return $this->hasMany('\App\RakeProductAllotment','by_road_id')->with('dealer')->groupBy('dealer_id'); } public function users(){ return $this->belongsTo('\App\User'); } }