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
eb193c1d
Commit
eb193c1d
authored
Jan 18, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on the route class.
parent
bfc04e28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
laravel/routing/route.php
+1
-1
laravel/routing/router.php
+0
-4
tests/cases/laravel/route.test.php
+2
-1
No files found.
laravel/routing/route.php
View file @
eb193c1d
...
...
@@ -58,7 +58,7 @@ class Route {
// Extract each URI from the route key. Since the route key has the request
// method, we will extract that from the string. If the URI points to the
// root of the application, a single forward slash will be returned.
$uris
=
array_get
(
$action
,
'handles'
,
array
());
$uris
=
array_get
(
$action
,
'handles'
,
array
(
$key
));
$this
->
uris
=
array_map
(
array
(
$this
,
'extract'
),
$uris
);
...
...
laravel/routing/router.php
View file @
eb193c1d
...
...
@@ -200,8 +200,6 @@ class Router {
$action
=
array
(
'uses'
=>
Bundle
::
prefix
(
$bundle
)
.
'home@index'
);
$action
[
'handles'
]
=
array
(
$destination
);
return
new
Route
(
$method
.
' '
.
$uri
,
$action
);
}
...
...
@@ -245,8 +243,6 @@ class Router {
$action
=
array
(
'uses'
=>
$prefix
.
$controller
.
'@'
.
$method
);
$action
[
'handles'
]
=
array
(
$destination
);
return
new
Route
(
$destination
,
$action
,
$segments
);
}
}
...
...
tests/cases/laravel/route.test.php
View file @
eb193c1d
...
...
@@ -19,9 +19,10 @@ class RouteTest extends PHPUnit_Framework_TestCase {
{
$route
=
new
Laravel\Routing\Route
(
'GET /'
,
array
(
'handles'
=>
array
(
'GET /foo/bar'
)));
$this
->
assertFalse
(
$route
->
handles
(
'/'
));
$this
->
assertFalse
(
$route
->
handles
(
'baz'
));
$this
->
assertTrue
(
$route
->
handles
(
'foo/*'
));
$this
->
assertTrue
(
$route
->
handles
(
'foo/bar'
));
$this
->
assertFalse
(
$route
->
handles
(
'baz'
));
$route
=
new
Laravel\Routing\Route
(
'GET /'
,
array
(
'handles'
=>
array
(
'GET /'
,
'GET /home'
)));
...
...
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