Logout fix (#28)
This commit is contained in:
parent
1c854da1e5
commit
10128e4817
@ -80,8 +80,14 @@
|
|||||||
@if(Entrust::hasRole('admin'))
|
@if(Entrust::hasRole('admin'))
|
||||||
<a href="{{ url('/admin') }}">Admin</a>
|
<a href="{{ url('/admin') }}">Admin</a>
|
||||||
@endif
|
@endif
|
||||||
<a href="{{ url('/dashboard') }}">Dashboard</a>
|
<a href="{{ url('/user/dashboard') }}">Dashboard</a>
|
||||||
<a href="{{ url('/logout') }}">Logout</a>
|
<a href="{!! url('/logout') !!}" class="btn btn-default btn-flat"
|
||||||
|
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||||
|
Sign out
|
||||||
|
</a>
|
||||||
|
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
|
||||||
|
{{ csrf_field() }}
|
||||||
|
</form>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@ -8,7 +8,7 @@ Route::get('/home', 'HomeController@index');
|
|||||||
* These are only visible to a logged in user
|
* These are only visible to a logged in user
|
||||||
*/
|
*/
|
||||||
Route::group([
|
Route::group([
|
||||||
'namespace' => 'Frontend', 'prefix' => 'frontend', 'as' => 'frontend.',
|
'namespace' => 'Frontend', 'prefix' => 'user', 'as' => 'frontend.',
|
||||||
'middleware' => ['role:admin|user'],
|
'middleware' => ['role:admin|user'],
|
||||||
], function () {
|
], function () {
|
||||||
Route::resource('dashboard', 'DashboardController');
|
Route::resource('dashboard', 'DashboardController');
|
||||||
|
Loading…
Reference in New Issue
Block a user