예제 #1
0
파일: Sale.php 프로젝트: sebalb/shopapp
 public function show(UserAuth $user, $uid, $sid)
 {
     return $user->sells()->with(['product' => function ($q) {
         $q->select('id', 'title');
     }, 'seller' => function ($q) {
         $q->select('id', 'username');
     }, 'buyer' => function ($q) {
         $q->select('id', 'username');
     }])->find($sid) ?: $this->notFoundJson();
 }