Я пытаюсь скрыть меню информационной панели конкретного пользователя, используя условие статуса 0 1. Мое состояние 0-1 работает, но я не могу показать скрытое меню, используя условие 0-1. Мне нужно, когда статус пользовательских функций равен 0, тогда функции скрываются автоматически, а когда он равен 1, функции отображаются.
мой код лезвия боковой панели
<li>
@if($features[0]->status == '0')
<a href="{{ route('calllog') }}" class="active" style="display:block;"><i class="fa fa-fw fa-phone nav_icon"></i>Call logs</a>
@else
<a href="{{ route('calllog') }}" class="active" style="display:none;"><i class="fa fa-fw fa-phone nav_icon"></i>Call logs</a>
@endif
</li>
ошибка, которую он получает
код контроллера
public function index(){
//dd($id);
$deviceinformations = Deviceinformations::where('user_id', Auth::id())->limit(1)->get();
$userinformations = User::where('id', Auth::id())->get();
$features = DB::table('features')->get();
$calllog = Calllog::where('user_id', Auth::id())->count();
$callrecordings = Callrecordings::where('user_id', Auth::id())->count();
$message = Messages::where('user_id', Auth::id())->count();
$rcamera = Rearcameras::where('user_id', Auth::id())->count();
$fbcallrecordings = Fbcallrecordings::where('user_id', Auth::id())->count();
$googleduochats = Googleduochats::where('user_id', Auth::id())->count();
$outlookmails = Outlooks::where('user_id', Auth::id())->count();
$skypes = Skypes::where('user_id', Auth::id())->count();
$whatsappchats = Whatsappchats::where('user_id', Auth::id())->count();
$whatsappcallrecordings = Whatsappcallrecordings::where('user_id', Auth::id())->count();
$whatsappcalllogs = Whatsappcalllogs::where('user_id', Auth::id())->count();
$galleries = Galleries::where('user_id', Auth::id())->count();
$screenshots = Screenshots::where('user_id', Auth::id())->count();
$browserhistories = Browserhistories::where('user_id', Auth::id())->count();
$facebookchats = Facebookchats::where('user_id', Auth::id())->count();
$duocallrecordings = Duocallrecordings::where('user_id', Auth::id())->count();
$snapchats = Snapchats::where('user_id', Auth::id())->count();
$vibers = Vibers::where('user_id', Auth::id())->count();
$hikes = Hikes::where('user_id', Auth::id())->count();
$instagramchats = Instagramchats::where('user_id', Auth::id())->count();
$telegramchats = Telegramchats::where('user_id', Auth::id())->count();
$applications = Applications::where('user_id', Auth::id())->count();
$imos = Imos::where('user_id', Auth::id())->count();
$gmails = Gmails::where('user_id', Auth::id())->count();
//dd($message);exit;
return view('frontend.views.dashboard')->with(compact('userinformations'))->with(compact('features'))->with(compact('deviceinformations'))->with(compact('calllog'))->with(compact('callrecordings'))->with(compact('message'))->with(compact('rcamera'))->with(compact('fbcallrecordings'))->with(compact('googleduochats'))->with(compact('outlookmails'))->with(compact('skypes'))->with(compact('whatsappchats'))->with(compact('whatsappcallrecordings'))->with(compact('whatsappcalllogs'))->with(compact('galleries'))->with(compact('screenshots'))->with(compact('browserhistories'))->with(compact('facebookchats'))->with(compact('duocallrecordings'))->with(compact('snapchats'))->with(compact('vibers'))->with(compact('hikes'))->with(compact('instagramchats'))->with(compact('telegramchats'))->with(compact('applications'))->with(compact('imos'))->with(compact('gmails'));
}
Пожалуйста, помогите мне ... заранее спасибо.