0
没有找到控制器方法这是我的控制器:同时使用link_to_action助手功能
class UserPostController extends \BaseController {
public function index($user_id)
{
$posts = Post::with('user')->find($user_id)->paginate(20);
return View::make('users.posts.index', compact('posts'));
}
}
这是我的路线:
Route::resource('posts', 'PostsController');
Route::controller('users', 'UsersController');
Route::resource('users.posts', 'UserPostController');
这是我的看法:
{{ link_to_action('[email protected]', 'Show posts', array(Auth::user()->id)) }}
我写的作曲家转储自动加载后得到错误,但它仍然无法正常工作。
Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
Controller method not found.