Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
a98c0d64
Commit
a98c0d64
authored
Nov 10, 2014
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move middleware.
parent
97287c89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
46 deletions
+2
-46
app/Http/Kernel.php
+1
-1
app/Http/Middleware/UnderMaintenance.php
+0
-45
resources/views/framework/maintenance.php
+1
-0
No files found.
app/Http/Kernel.php
View file @
a98c0d64
...
...
@@ -11,7 +11,7 @@ class Kernel extends HttpKernel {
* @var array
*/
protected
$middleware
=
[
'
App
\Http\Middleware\UnderMaintenance'
,
'
Illuminate\Foundation
\Http\Middleware\UnderMaintenance'
,
'Illuminate\Cookie\Middleware\EncryptCookies'
,
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse'
,
'Illuminate\Session\Middleware\StartSession'
,
...
...
app/Http/Middleware/UnderMaintenance.php
deleted
100644 → 0
View file @
97287c89
<?php
namespace
App\Http\Middleware
;
use
Closure
;
use
Illuminate\Http\Response
;
use
Illuminate\Contracts\Routing\Middleware
;
use
Illuminate\Contracts\Foundation\Application
;
class
UnderMaintenance
implements
Middleware
{
/**
* The application implementation.
*
* @var Application
*/
protected
$app
;
/**
* Create a new filter instance.
*
* @param Application $app
* @return void
*/
public
function
__construct
(
Application
$app
)
{
$this
->
app
=
$app
;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public
function
handle
(
$request
,
Closure
$next
)
{
if
(
$this
->
app
->
isDownForMaintenance
())
{
return
new
Response
(
'Be right back!'
,
503
);
}
return
$next
(
$request
);
}
}
resources/views/framework/maintenance.php
0 → 100644
View file @
a98c0d64
Be
right
back
!
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment