示例#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);
 }