Protect admin routes with new eloquent sessions

When using Laravel’s own auth middleware an exception would then get
thrown which was being sent to Slack, hmmm.

So I modified the original MyAuthMiddleware to use the Auth facade
instead of a custom session key.

A logout page has also been added.
This commit is contained in:
Jonny Barnes 2019-03-23 09:35:07 +00:00
parent db3708bbb6
commit 2e79492b01
4 changed files with 58 additions and 17 deletions

View file

@ -0,0 +1,10 @@
@extends('master')
@section('title')Logout @stop
@section('content')
<h2>Logout</h2>
<form action="logout" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="submit" name="submit" value="Logout">
</form>
@stop