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
7e33b4f8
Commit
7e33b4f8
authored
Nov 30, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up some code comments.
parent
20fc7558
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
url.php
laravel/url.php
+3
-5
No files found.
laravel/url.php
View file @
7e33b4f8
...
@@ -124,20 +124,18 @@ class URL {
...
@@ -124,20 +124,18 @@ class URL {
{
{
$uris
=
explode
(
', '
,
key
(
$route
));
$uris
=
explode
(
', '
,
key
(
$route
));
// Grab the first URI assigned to the route and remove the URI and
// leading slash from the destination that's defined on the route.
$uri
=
substr
(
$uris
[
0
],
strpos
(
$uris
[
0
],
'/'
));
$uri
=
substr
(
$uris
[
0
],
strpos
(
$uris
[
0
],
'/'
));
// Spin through each route parameter and replace the route wildcard
// Spin through each route parameter and replace the route wildcard
// segment with the corresponding parameter passed to the method.
// segment with the corresponding parameter passed to the method.
// Afterwards, we will replace all of the remaining optional URI
// segments with spaces since they may not have been specified
// in the array of parameters.
foreach
((
array
)
$parameters
as
$parameter
)
foreach
((
array
)
$parameters
as
$parameter
)
{
{
$uri
=
preg_replace
(
'/\(.+?\)/'
,
$parameter
,
$uri
,
1
);
$uri
=
preg_replace
(
'/\(.+?\)/'
,
$parameter
,
$uri
,
1
);
}
}
// Replace all remaining optional segments with spaces. Since the
// segments are optional, some of them may not have been assigned
// values from the parameter array.
return
static
::
to
(
str_replace
(
array
(
'/(:any?)'
,
'/(:num?)'
),
''
,
$uri
),
$https
);
return
static
::
to
(
str_replace
(
array
(
'/(:any?)'
,
'/(:num?)'
),
''
,
$uri
),
$https
);
}
}
...
...
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