In Larvel 4 I\'m trying to setup nested resource controllers.
in routes.php:
Route::resour
In actual fact you should replace the "admin/photo" with "admin.photo" for laravel to set-up a resource for photo being a sub of admin.
Check this https://tutsplus.com/lesson/nested-resources/
Just simply use a group prefix -> admin. Using nested admin.photo will create you an wrong url like admin/{admin}/photo/{photo}, which you don't want.
See https://github.com/laravel/framework/issues/170 Found my answer there (see what Taylor wrote)
For those who want to see my code that works now in routes.php:
Route::group(array('prefix' => 'admin'), function() {
// Responds to Request::root() . '/admin/photo'
Route::resource('photo', 'Controllers\\Admin\\PhotoController');
});
Probably you will need to tell Composer to reload classes again, run from your command line:
composer dump-autoload
That should work.