Esempio n. 1
0
 public function show($uid, $pid)
 {
     return \App\Models\Sale::query()->with(['product' => function ($q) {
         $q->select('id', 'title');
     }, 'seller' => function ($q) {
         $q->select('id', 'username');
     }])->where('buyer_id', '=', $uid)->find($pid);
 }