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.