Merge pull request #29 from nabeelio/logout-fix-final

Logout fix final
This commit is contained in:
Nabeel Shahzad 2017-06-21 17:59:05 -05:00 committed by GitHub
commit 363d463833
4 changed files with 8 additions and 15 deletions

View File

@ -13,4 +13,8 @@ class DashboardController extends BaseController
{
return view('frontend.dashboard');
}
public function test()
{
return view('frontend.dashboard');
}
}

View File

@ -106,13 +106,7 @@
<a href="#" class="btn btn-default btn-flat">Profile</a>
</div>
<div class="pull-right">
<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') !!}" class="btn btn-default btn-flat">Sign out</a>
</div>
</li>
</ul>
@ -193,7 +187,7 @@
<!-- AdminLTE App -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/js/app.min.js"></script>
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"
integrity="sha512-A7vV8IFfih/D732iSSKi20u/ooOfj/AGehOKq0f4vLT1Zr2Y+RX7C+w8A1gaSasGtRUZpF/NZgzSAu4/Gc41Lg=="
crossorigin=""></script>

View File

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

View File

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