I have developed an application in laravel 5.5 and I have added a template that I have purchased. I have the problem in the main layout, which is where I have the top, horizontal and vertical menu bars and, in some views, I do not respect hyperlinks. For example:
Which is the dropdown menu of user administration and settings, dropdown menu, I put the code of the parent layout that extends this view:
<div class="dropdown-menu dropdown-menu-right">
<a href="{{ url('/worker/show/.Crypt::encrypt(Auth::user()->id)') }}" class="dropdown-item">
<i class="icon-head"></i> Editar Perfil</a>
<a href="{{ route('logout') }}" class="dropdown-item" onclick="event.preventDefault();document.getElementById('logout-form').submit();">Logout</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>
</div>
If I inspect the code I see that this link that says "worker/show...
does not work, here is the inspection code:
<a href="" data-toggle="dropdown" class="dropdown-toggle nav-link dropdown-user-link" aria-expanded="false">
<span class="avatar avatar-online">
<img src="/images/portrait/small/avatar-s-1.png" alt="avatar"><i></i>
</span>
<span class="user-name">Admin</span>
</a>
The dropdown does not unfold, but it only happens in some views. What is this about? Am I not extending the views well? All views extend from the parent layout and have well-defined sections. I can put the code of the views if you need it.
Thanks for the attention. A greeting.
Edit: Routes:
Route::get('/worker/show/{id_worker}', 'UserController@show');
//rutas accessibles solo para el usuario administrador
Route::group(['middleware' => 'usuarioAdmin'], function () {
Route::get('/home', 'HomeController@index')->name('home');
//Rutas empleados
});
//rutas accessibles solo para el usuario standard
Route::group(['middleware' => 'usuarioStandard'], function () {
Route::get('/vacation/create', 'VacationController@index');
Route::get('/vacation/creat/{id_worker}/{name_worker}', 'VacationController@create');
});