Reputation: 4296
I have this bit of code:
<li> {!! link_to_route('get_register', 'Register' ) !!} </li>
As you can see i used the link_to_route function. I defined this Route in this bit of code:
Route::group (['prefix' => 'auth'], function() {
Route::get('register',[
'as' => 'get_register',
'uses' => 'Auth\AuthController@get_register'
]);
Route::post('register',[
'as' => 'post_register',
'uses' => 'Auth\AuthController@post_register'
]);
});
Now when i go to my page in the browser i get the following error:
Anything that could help would be highly appreciated.
Thanks in advance,
-Kevin
Upvotes: 1
Views: 1453
Reputation: 12450
link_to_route
was part of the Laravel HTML library which was removed in Laravel 5. It is now maintained by Laravel Collective, so you will need to install their package to use that function. Camilo's solution is the standard way to link to named routes now.
Upvotes: 1
Reputation: 668
You can use a
<a href="{{ route('get_register') }}">Register</a>
I hope this help
Upvotes: 1