我的档案:
@if(Auth::check() && (Auth::user()->id == $job->user_id || Auth::user()->id == Auth::user()->role_id <3 ))
<th> Status </th>
<th colspan="3">Action</th>
@endif
如何修复。我不明白,请!
答案 0 :(得分:0)
尝试这个
@if(Auth::check() && $job && (Auth::user()->id == $job->user_id || Auth::user()->id == Auth::user()->role_id <3 ))
<th> Status </th>
<th colspan="3">Action</th>
@endif
答案 1 :(得分:0)
I think your blade file will not understand Auth class, instead you can change your code to something like
@if(auth()->check() && $job && (auth()->user()->id == $job->user_id || auth()->user()->id == auth()->user()->role_id <3 ))
<th> Status </th>
<th colspan="3">Action</th>
@endif
Also make sure you sending job data from your controller to view file