0
PHP를 사용하여 navbar를 생성하는 플러그인이 있습니다. 폴더는 프로젝트에/설정/menu.phpLaravel의 config 폴더에서 모델을 사용할 수 없습니다.
그것은 다음과 같습니다
나는 몇 가지 모델 정보를 추가 할<?php
return [
//HORIZONTAL MENU LAYOUT - MENU
'horizontal' => [
[
'title' => 'bar',
'link' => '/bar/all',
'active' => 'bar*',
'icon' => 'fa fa-sign-in',
],
[
'title' => 'foo',
'link' => '/foo/all',
'active' => 'foo*',
'icon' => 'fa fa-sign-out',
],
]
];
.
<?php
use Auth;
$id = Auth::user()->id;
return [
//HORIZONTAL MENU LAYOUT - MENU
'horizontal' => [
[
'title' => 'bar',
'link' => '/bar/'. $id,
'active' => 'bar*',
'icon' => 'fa fa-sign-in',
],
[
'title' => 'foo',
'link' => '/foo/all',
'active' => 'foo*',
'icon' => 'fa fa-sign-out',
],
]
];
내가이 오류 : Class 'Auth' not found
이
내 시도이다. 또한 모델을 시도했다 : 나에게이 오류 제공$model = \App\Model::count();
: 나는이 모델은 여기에 어떻게 사용합니까
Call to a member function connection() on null
를?