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
fe218f9b
Commit
fe218f9b
authored
Nov 09, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore controller section of autoloader.
parent
8718b582
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
18 deletions
+15
-18
laravel/autoloader.php
+15
-0
laravel/routing/controller.php
+0
-18
No files found.
laravel/autoloader.php
View file @
fe218f9b
...
...
@@ -86,6 +86,20 @@ class Autoloader {
return
$path
;
}
// Since not all controllers will be resolved by the controller resolver,
// we will do a quick check in the controller directory for the class.
// For instance, since base controllers would not be resolved by the
// controller class, we will need to resolve them here.
if
(
strpos
(
$class
,
'_Controller'
)
!==
false
)
{
$controller
=
str_replace
(
array
(
'_Controller'
,
'_'
),
array
(
''
,
'/'
),
$class
);
if
(
file_exists
(
$path
=
strtolower
(
CONTROLLER_PATH
.
$controller
.
EXT
)))
{
return
$path
;
}
}
}
}
\ No newline at end of file
laravel/routing/controller.php
View file @
fe218f9b
...
...
@@ -6,24 +6,6 @@ use Laravel\Request;
use
Laravel\Redirect
;
use
Laravel\Response
;
/**
* Register a function on the autoload stack to lazy-load controller files.
* We register this function here to keep the primary autoloader smaller
* since this logic is not needed for every Laravel application.
*/
spl_autoload_register
(
function
(
$controller
)
{
if
(
strpos
(
$controller
,
'_Controller'
)
!==
false
)
{
$controller
=
str_replace
(
array
(
'_Controller'
,
'_'
),
array
(
''
,
'/'
),
$controller
);
if
(
file_exists
(
$path
=
strtolower
(
CONTROLLER_PATH
.
$controller
.
EXT
)))
{
return
$path
;
}
}
});
abstract
class
Controller
{
/**
...
...
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