I have the following problem, I get a question mark "?" instead of "/" in my link of the "security (security)" option in the sidebar or url menu
How can I solve that?
Thank you!
The problem is that you have two routes with the same name
, so laravel search the last one and omit the rest, then as your last route defined with the name
security is: Route::put('/panel/security','UserController@securityUpdate')->name('segurity')
, is to which it is redirected and not to the first as you wish.
The solution is simple, change to one of these the name or both, which is what I recommend.
On your web.php
Route::get('/panel/security/{id}','UserController@securityEdit')->name('segurity.edit')
Route::put('/panel/security','UserController@securityUpdate')->name('segurity.update')
and your view for the edition:
<a href='{{route('security.edit',auth()->user()->id)}}'>editar</a>
or for the update:
<form role="form" action="{{route(security.update)}}" method="put">
....mucho codigo
</form>