Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
92ff0474
Commit
92ff0474
authored
Dec 02, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow message container to be passed into redirect->with_errors.
parent
cb306c90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
redirect.php
laravel/redirect.php
+8
-3
No files found.
laravel/redirect.php
View file @
92ff0474
...
@@ -98,14 +98,19 @@ class Redirect extends Response {
...
@@ -98,14 +98,19 @@ class Redirect extends Response {
* <code>
* <code>
* // Redirect and flash a validator's errors the session
* // Redirect and flash a validator's errors the session
* return Redirect::to('register')->with_errors($validator);
* return Redirect::to('register')->with_errors($validator);
*
* // Redirect and flash a message container to the session
* return Redirect::to('register')->with_errors($messages);
* </code>
* </code>
*
*
* @param Validator
$validato
r
* @param Validator
|Messages $containe
r
* @return Redirect
* @return Redirect
*/
*/
public
function
with_errors
(
Validator
$validato
r
)
public
function
with_errors
(
$containe
r
)
{
{
return
$this
->
with
(
'errors'
,
$validator
->
errors
);
$errors
=
(
$container
instanceof
Validator
)
?
$container
->
errors
:
$container
;
return
$this
->
with
(
'errors'
,
$errors
);
}
}
/**
/**
...
...
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