예제 #1
0
파일: Buy.php 프로젝트: sebalb/shopapp
 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);
 }