Updated Logout from form to get link

This commit is contained in:
PHP-Mods
2017-06-22 01:45:37 +03:00
parent 88d163cc13
commit bee4044d63
3 changed files with 3 additions and 15 deletions

View File

@@ -106,13 +106,7 @@
<a href="#" class="btn btn-default btn-flat">Profile</a> <a href="#" class="btn btn-default btn-flat">Profile</a>
</div> </div>
<div class="pull-right"> <div class="pull-right">
<a href="{!! url('/logout') !!}" class="btn btn-default btn-flat" <a href="{!! url('/logout') !!}" class="btn btn-default btn-flat">Sign out</a>
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>
</div> </div>
</li> </li>
</ul> </ul>

View File

@@ -81,13 +81,6 @@
<a href="{{ url('/admin') }}">Admin</a> <a href="{{ url('/admin') }}">Admin</a>
@endif @endif
<a href="{{ url('/user/dashboard') }}">Dashboard</a> <a href="{{ url('/user/dashboard') }}">Dashboard</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>
<a href="{{ url('/logout') }}">Logout</a> <a href="{{ url('/logout') }}">Logout</a>
@endif @endif
</div> </div>

View File

@@ -15,5 +15,6 @@ Route::group([
}); });
Auth::routes(); Auth::routes();
Route::get('/logout', 'Auth\LoginController@logout');
require base_path('routes/admin.php'); require base_path('routes/admin.php');