fix user trans fatal bug
This commit is contained in:
@@ -270,7 +270,7 @@ class UserController extends Controller
|
||||
{
|
||||
$data = [];
|
||||
$user_id = $request->session()->get('user_id');
|
||||
$data['trans'] = Transaction::with('feedback')->where('buyer_id', $user_id)->orderBy('id', 'desc')->paginate(15);
|
||||
$data['trans'] = Transaction::with('feedback', 'good')->where('buyer_id', $user_id)->orderBy('id', 'desc')->paginate(15);
|
||||
return view::make('user.buyer')->with($data);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,11 @@
|
||||
<tr id="tran{{ $tran->id }}">
|
||||
<td>{{ $tran->id }}</td>
|
||||
<td><a href="/good/{{$tran->good_id}}"
|
||||
onMouseOver="toolTip('<img src=/good/{{ sha1($tran->good_id) }}/titlepic>')"
|
||||
onMouseOut="toolTip()">{{ $tran->good->good_name }}</a></td>
|
||||
@if(isset($tran->good))
|
||||
onMouseOver="toolTip('<img src=/good/{{ sha1($tran->good_id) }}/titlepic>')"
|
||||
onMouseOut="toolTip()"
|
||||
@endif
|
||||
>{{ isset($tran->good) ? $tran->good->good_name : "此商品已删除" }}</a></td>
|
||||
<td>{{ $tran->number }}</td>
|
||||
@if($tran->status == 0)
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user