routes - DaveJamesMiller Breadcrumbs Error - Laravel -
i trying set breadcrumbs
laravel 5
application. unfortunately, being presented error when access localhost:8888/auth/login
:
errorexception in /users/ben/sites/laravel/vendor/davejamesmiller/laravel-breadcrumbs/src/currentroute.php line 29
the current route (get /auth/login) not named - please check routes.php "as" parameter
routes.php:
route::get('auth/login', 'auth\authcontroller@getlogin', ['as' => 'login', 'uses' => 'auth/authcontroller@getlogin']);
the error shown or without ['as' => 'login', 'uses' => 'auth/authcontroller@getlogin']
addition.
breadcrumbs.php
breadcrumbs::register('login', function($breadcrumbs) { $breadcrumbs->parent('home'); $breadcrumbs->push('login', route('login')); });
thank help.
i resolved issue changing route following:
route::get('auth/login', ['as' => 'login', 'uses' => 'auth/authcontroller@getlogin']);
you can declare controller method you're using once.
Comments
Post a Comment