我遇到麻烦,让路线找到一个页面,当我路由到它。我的路由设置和被识别为当我创建链接使用URL :: route('account-create')laravel将成功解析到'/ account / create'中我想要链接到哪里去。但是点击它,我得到一个404错误。
I am having troubles getting laravel to find a page when I route to it. My route is setup and being recognized as when I create link using URL::route('account-create') laravel will successfully parse that into '/account/create' as to where I want the link to go to. But upon clicking it I get a 404 error.
我的路线
Route::get('/account/create', array( 'as' => 'account-create', 'uses' => 'AccountController@getCreate' ));我的控制器
class AccountController extends BaseController { // view the create user form public function getCreate() { //return View::make('account.create'); } }blade.php被创建并放在app / views下的帐户文件夹中。注释或取消注释没有区别。 404仍然存在。
The create.blade.php is created and put inside an account folder under app/views. commenting or uncommenting makes no difference. The 404 remains.
我也试过:
Route::get('/account/create', function() { return 'Hello World'; });在我的routes.php中仍然保留404
in my routes.php still the 404 remains
有没有一些配置我缺少?
Is there some configuration I am missing?
推荐答案在看了一些之后,我发现我需要启用rewrite_module apache 。使得完美的意义真的,如何可以laravel做清洁urls如果它不能重写url。我知道这很容易解决。
After looking around some more I discovered I needed to enable rewrite_module on apache. Makes perfect sense really, how can laravel make clean urls if it cant rewrite the url. I knew it was going to be something simple to fix.
非常感谢您的回复
更多推荐
404错误laravel 4路由
发布评论