From 2e51fbff9d8472a0e98af39aff52d30f0b67706b Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Wed, 21 Nov 2018 12:17:28 +0100 Subject: Added / route with redirects --- src/Http/Exceptions/HttpPermanentRedirect.php | 17 +++++++++++++++++ src/Http/Exceptions/HttpRedirect.php | 23 +++++++++++++++++++++++ src/Http/Exceptions/HttpTemporaryRedirect.php | 17 +++++++++++++++++ src/Middleware/LegacyMiddleware.php | 3 --- 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 src/Http/Exceptions/HttpPermanentRedirect.php create mode 100644 src/Http/Exceptions/HttpRedirect.php create mode 100644 src/Http/Exceptions/HttpTemporaryRedirect.php (limited to 'src') diff --git a/src/Http/Exceptions/HttpPermanentRedirect.php b/src/Http/Exceptions/HttpPermanentRedirect.php new file mode 100644 index 00000000..a1aa986f --- /dev/null +++ b/src/Http/Exceptions/HttpPermanentRedirect.php @@ -0,0 +1,17 @@ + $url, + ], $headers); + + parent::__construct($statusCode, '', $headers); + } +} diff --git a/src/Http/Exceptions/HttpTemporaryRedirect.php b/src/Http/Exceptions/HttpTemporaryRedirect.php new file mode 100644 index 00000000..ece8d607 --- /dev/null +++ b/src/Http/Exceptions/HttpTemporaryRedirect.php @@ -0,0 +1,17 @@ +path(); $page = str_replace('-', '_', $page); } - if ($page == '/') { - $page = $this->auth->user() ? config('home_site') : 'login'; - } $title = $content = ''; if ( -- cgit v1.2.3-70-g09d2