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
0b3ecf89
Commit
0b3ecf89
authored
Nov 11, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass status when redirecting to route.
parent
c11ee765
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
redirect.php
laravel/redirect.php
+4
-2
No files found.
laravel/redirect.php
View file @
0b3ecf89
...
@@ -81,14 +81,16 @@ class Redirect extends Response {
...
@@ -81,14 +81,16 @@ class Redirect extends Response {
{
{
$parameters
=
(
isset
(
$parameters
[
0
]))
?
$parameters
[
0
]
:
array
();
$parameters
=
(
isset
(
$parameters
[
0
]))
?
$parameters
[
0
]
:
array
();
$status
=
(
isset
(
$parameters
[
1
]))
?
$parameters
[
1
]
:
302
;
if
(
strpos
(
$method
,
'to_secure_'
)
===
0
)
if
(
strpos
(
$method
,
'to_secure_'
)
===
0
)
{
{
return
static
::
to
(
URL
::
to_route
(
substr
(
$method
,
10
),
$parameters
,
true
));
return
static
::
to
(
URL
::
to_route
(
substr
(
$method
,
10
),
$parameters
,
true
)
,
$status
);
}
}
if
(
strpos
(
$method
,
'to_'
)
===
0
)
if
(
strpos
(
$method
,
'to_'
)
===
0
)
{
{
return
static
::
to
(
URL
::
to_route
(
substr
(
$method
,
3
),
$parameters
));
return
static
::
to
(
URL
::
to_route
(
substr
(
$method
,
3
),
$parameters
)
,
$status
);
}
}
throw
new
\Exception
(
"Method [
$method
] is not defined on the Redirect class."
);
throw
new
\Exception
(
"Method [
$method
] is not defined on the Redirect class."
);
...
...
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