Kevin.a Kevin.a - 2 months ago 6
PHP Question

Laravel link_to_route function

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:

http://prntscr.com/cniild

Anything that could help would be highly appreciated.

Thanks in advance,

-Kevin

Answer

You can use a

<a href="{{ route('get_register') }}">Register</a>

I hope this help

Comments