404 error laravel 4 routing

I am having problems getting laravel to find the page as I navigate to it. My route is configured and recognized when I create a link using URL :: route ('account-create'). Laravel will successfully parse this to '/ account / create' where I want the link to be included. But by clicking on it I get a 404 error.

My route

Route::get('/account/create', array(
     'as' => 'account-create',
     'uses' => 'AccountController@getCreate'
 ));

      

My controller

 class AccountController extends BaseController {


    // view the create user form
    public function getCreate() 
    {
        //return View::make('account.create');
    }


}

      

A create.blade.php file is created and placed inside the accounts folder in applications / views. commenting or splitting makes no difference. 404 remains.

I've also tried:

    Route::get('/account/create', function()
{
    return 'Hello World';
});

      

there is still 404 left in my routes .php

Is there some configuration I am missing?

+3


source to share


2 answers


After looking around a bit more, I found that I need to enable rewrite_module in apache. Quite right, how can laravel make clean urls if it can't rewrite the url. I knew this would be something simple to fix.



Thanks a lot for your answers

+1


source


Does switching to work index.php/account/create

? If so, it is probably a bug in your root level .htaccess

or in the VirtualHost settings httpd.conf

on your server. Place content .htaccess

from app/public

.



0


source







All Articles