user3026894
user3026894

Reputation: 503

PHP Laravel Framework Routing Error

I installed laravel+composer in my localhost and then I tried to run basic routes.php with this block of codes:

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

and then I tried to run it by using this http://localhost/laravel/app/x and http://localhost/laravel/x

and I'm gettin this error type:

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
Apache/2.4.4 (Unix) PHP/5.5.3 OpenSSL/1.0.1e mod_perl/2.0.8-dev Perl/v5.16.3

How can I overcome this issue?

Upvotes: 2

Views: 657

Answers (1)

elliotanderson
elliotanderson

Reputation: 452

All of the Laravel routes go through the public folder.

Assuming your project name is Laravel, this should work.

http://localhost/laravel/public/x

Upvotes: 1

Related Questions