I've created a new file/app/controllers/admin/logincontroller.php:
class LoginController extends BaseController{ public function showLogin() { echo 'test'; }}
Added code to the routing file/app/routes.php:
Route::get('/admin/login','admin.LoginController@loginForm');
Has opened the htaccess, but when I visited/admin/login error, prompted
ReflectionExceptionClass admin.LoginController does not exist
What I want to know now is how I can access the method I created, the access address is how much
Reply content:
I've created a new file/app/controllers/admin/logincontroller.php:
class LoginController extends BaseController{ public function showLogin() { echo 'test'; }}
Added code to the routing file/app/routes.php:
Route::get('/admin/login','admin.LoginController@loginForm');
Has opened the htaccess, but when I visited/admin/login error, prompted
ReflectionExceptionClass admin.LoginController does not exist
What I want to know now is how I can access the method I created, the access address is how much
php artisan dump-autoload
Focus
Route::get('/admin/login','LoginController@loginForm');
Can
Since Laravel is using the composer load class, if the class that is not created with the command needs to be updated autoload, as @kankana said: composer dump-autoload
, recommend to see here http://segmentfault.com/a/1190000000355928