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
10b9001e
Commit
10b9001e
authored
Nov 20, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust how the response is rendered, as well as move input flashing to after filter.
parent
7a963197
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
17 deletions
+13
-17
application/filters.php
+1
-1
laravel/laravel.php
+0
-10
laravel/routing/controller.php
+6
-3
laravel/routing/route.php
+6
-3
No files found.
application/filters.php
View file @
10b9001e
...
...
@@ -50,7 +50,7 @@ return array(
'after'
=>
function
(
$response
)
{
// Do stuff after every request to your application.
Input
::
flash
();
},
...
...
laravel/laravel.php
View file @
10b9001e
...
...
@@ -214,14 +214,6 @@ else
}
/**
* Stringify the response. We need to force the response to be
* stringed before closing the session, since the developer may
* be using the session within their views, so we cannot age
* the session data until the view is rendered.
*/
$response
->
content
=
$response
->
render
();
/**
* Close the session and write the active payload to persistent
* storage. The session cookie will also be written and if the
* driver is a sweeper, session garbage collection might be
...
...
@@ -229,8 +221,6 @@ $response->content = $response->render();
*/
if
(
Config
::
$items
[
'session'
][
'driver'
]
!==
''
)
{
Input
::
flash
();
IoC
::
core
(
'session'
)
->
save
(
$driver
);
}
...
...
laravel/routing/controller.php
View file @
10b9001e
...
...
@@ -136,14 +136,17 @@ abstract class Controller {
}
}
// The after filter and the framework expects all responses to
// be instances of the Response class. If the method did not
// return an instsance of Response, we will make on now.
if
(
!
$response
instanceof
Response
)
{
$response
=
new
Response
(
$response
);
}
// Stringify the response. We need to force the response to be
// stringed before closing the session, since the developer may
// be using the session within their views, so we cannot age
// the session data until the view is rendered.
$response
->
content
=
$response
->
render
();
Filter
::
run
(
$this
->
filters
(
'after'
,
$method
),
array
(
$response
));
return
$response
;
...
...
laravel/routing/route.php
View file @
10b9001e
...
...
@@ -111,14 +111,17 @@ class Route {
}
}
// The after filter and the framework expects all responses to
// be instances of the Response class. If the route did not
// return an instsance of Response, we will make on now.
if
(
!
$response
instanceof
Response
)
{
$response
=
new
Response
(
$response
);
}
// Stringify the response. We need to force the response to be
// stringed before closing the session, since the developer may
// be using the session within their views, so we cannot age
// the session data until the view is rendered.
$response
->
content
=
$response
->
render
();
$filters
=
array_merge
(
$this
->
filters
(
'after'
),
array
(
'after'
));
Filter
::
run
(
$filters
,
array
(
$response
));
...
...
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