From fb0c574ed1725fe13c8ab073d2ead3fdc842c2ba Mon Sep 17 00:00:00 2001 From: Phil Burton Date: Fri, 1 Nov 2019 22:56:27 +0000 Subject: Added laravel project --- app/Http/Middleware/Authenticate.php | 21 ++++++++++++++++++++ app/Http/Middleware/CheckForMaintenanceMode.php | 17 ++++++++++++++++ app/Http/Middleware/EncryptCookies.php | 17 ++++++++++++++++ app/Http/Middleware/RedirectIfAuthenticated.php | 26 +++++++++++++++++++++++++ app/Http/Middleware/TrimStrings.php | 18 +++++++++++++++++ app/Http/Middleware/TrustProxies.php | 23 ++++++++++++++++++++++ app/Http/Middleware/VerifyCsrfToken.php | 24 +++++++++++++++++++++++ 7 files changed, 146 insertions(+) create mode 100644 app/Http/Middleware/Authenticate.php create mode 100644 app/Http/Middleware/CheckForMaintenanceMode.php create mode 100644 app/Http/Middleware/EncryptCookies.php create mode 100644 app/Http/Middleware/RedirectIfAuthenticated.php create mode 100644 app/Http/Middleware/TrimStrings.php create mode 100644 app/Http/Middleware/TrustProxies.php create mode 100644 app/Http/Middleware/VerifyCsrfToken.php (limited to 'app/Http/Middleware') diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php new file mode 100644 index 0000000..a4be5c5 --- /dev/null +++ b/app/Http/Middleware/Authenticate.php @@ -0,0 +1,21 @@ +expectsJson()) { + return route('login'); + } + } +} diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php new file mode 100644 index 0000000..35b9824 --- /dev/null +++ b/app/Http/Middleware/CheckForMaintenanceMode.php @@ -0,0 +1,17 @@ +check()) { + return redirect('/home'); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php new file mode 100644 index 0000000..5a50e7b --- /dev/null +++ b/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,18 @@ +