本文整理汇总了PHP中app\Menu::getMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP Menu::getMenu方法的具体用法?PHP Menu::getMenu怎么用?PHP Menu::getMenu使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Menu
的用法示例。
在下文中一共展示了Menu::getMenu方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupLayout
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
{
if (!is_null($this->layout)) {
$this->layout = view($this->layout);
$this->layout->menus = Menu::getMenu();
}
}
示例2: anyMenuSettings
public function anyMenuSettings()
{
$menus = Menu::getMenu();
return view('setting.list-menu',["menus"=>$menus]);
}
示例3: __construct
public function __construct(Menu $menu)
{
$this->data = [];
$this->data['menu'] = $menu->getMenu();
}
示例4: function
|
*/
Route::get('/exports/try','ExportsController@getTry');
Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
]);
Route::get('/',[ 'middleware' => 'auth','uses' =>'HomeController@index']);
Route::get('/view', function () {
$menus = Menu::getMenu() ;
return view('layout.index')->with([
"content"=>view("example"),
"menus"=>$menus
]);
});
Route::get('/login', function () {
return view('login');
});
Route::get('/home', 'HomeController@index');
Route::get('/{controller}/{id}',['middleware' => 'auth', function($controller,$id){
$controller = str_replace('-', ' ', strtolower(preg_replace('/[^A-Za-z0-9\-]/', '', $controller)));
$controller = str_replace(' ', '', Str::title($controller));