Laravel 4 nested resource controllers Route::resource('admin/photo', 'PhotoController'); not working

后端 未结 4 1089
無奈伤痛
無奈伤痛 2021-01-13 16:38

In Larvel 4 I\'m trying to setup nested resource controllers.

in routes.php:

Route::resour         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-13 17:15

    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');
    });
    

提交回复
热议问题