Link to home
Start Free TrialLog in
Avatar of andieje
andieje

asked on

Problem routing with Laravel

Hello

I 'think' I have successfully installed Laravel using 2 different internet guides. Here is one one of them

http://phpraxis.wordpress.com/2014/07/04/getting-started-with-laravel-4-on-ubuntu-installation-and-configuration/

I have managed to get the include laravel test page "You have arrived"

I am now unable to add an additional route. This is what i did in the routes.php file



Route::get('/', function()
{
        return View::make('hello');
});


Route::any('foo', function()
{
    return 'Hello Andrea';
});

Open in new window

If i add a page foo or foo.php I get the error

Not Found

The requested URL /foo was not found on this server.

I can alter the code in the default view

However if i do something like this

Route::get('/', function()
{
        return 'Hello Andrea';
});
everything is fine

I'm confused. I dont think I get Laravel views. how would i fix this to work as a first step on my jourmey

Route::any('foo', function()
{
    return 'Hello Andrea';
});

Some guides also suggested putting Laravel in the home folder e.g. /home/username/laravel and whan i tried this I couldnt even get the 'you have arrived page'

I thought Laravel had a shallow learning curve? It must be me.

Thanks for any help
ASKER CERTIFIED SOLUTION
Avatar of Lukasz Chmielewski
Lukasz Chmielewski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of andieje
andieje

ASKER

Ill double check - its on a differnet machine
Avatar of andieje

ASKER

will close quesion tonight if that is correct