php - Laravel custom controller get 404 error -


i have simple custom controller in route :

route::controller(     'validationmobiles', 'validationmobilescontroller',     [         'getindex' => 'validationmobiles.index',     ] ); 

unfortunately 404 error after run url :

http://localhost/laravel/public/validationmobiles.index 

my controller:

namespace app\http\controllers; class validationmobilescontroller extends controller {     public function getindex()     {         dd('ss');     } } 

updated:

full controll, method work fine in laravel 4, in laravel 5 added namespace:

route::controller(     'validationmobiles', 'validationmobilescontroller',     [         'getindex' => 'validationmobiles.index',         'postupdate' => 'validationmobiles.update',         'postedit' => 'validationmobiles.edit',         'getdelete' => 'validationmobiles.delete',         'getaccept' => 'validationmobiles.accept',         'getresend' => 'validationmobiles.resend',     ] ); 

validationmobiles.index name of route you've given, not url. if controller method getindex, method handle request validationmobiles/index url (http://localhost/laravel/public/validationmobiles/index).


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -