亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

html - How to use the Laravel-Menu plug-in
怪我咯
怪我咯 2017-05-16 16:53:04
0
1
614

The laravel-menu plugin is installed in Laravel 5.2.31, and providers and aliases have been configured according to the instructions on Github.
But whether it is through middleware or adding the navigation menu in routes.php, it cannot be used in the blade page{!! Menu::get('MyNavBar')->asUl() !!} will promptMethod get does not exist!
Solution!

怪我咯
怪我咯

走同樣的路,發(fā)現(xiàn)不同的人生

reply all(1)
Peter_Zhu

namespace App\Http\Controllers;
use Menu;

class TestController extends Controller
{
    public function Index()
    {
        $MyNavBar = Menu::make('MyNavBar', function($menu){

          $menu->add('Home');
          $menu->add('About',    'about');
          $menu->add('services', 'services');
          $menu->add('Contact',  'contact');

        })->asUl();
        
        return view('test',[
            'MyNavBar'=>$MyNavBar
        ]);
    }
}



#views
<html>
    <head>
        <title>Test</title>
    </head>
    <body>
        <p class="container">
        {!! $MyNavBar !!}
        </p>
    </body>
</html>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template