vimal ram
vimal ram

Reputation: 153

Laravel 5.2: url not found but router is available in windows 7 wamp server

Default route is running

for example:

Route::get('/', function () {
return view('welcome');
});

When i run this http://localhost/laracast/public Shows outputs as LARAVEL 5

But when I add new route to

Route::get('/hello', function() {    
return 'Welcome to Laracast';
});

It shows output as => url not found

I am using

1.Windows7

2.Wamp Server

3.Composer and

4.GIT BASH

what the mistake i done it

Upvotes: 0

Views: 73

Answers (1)

Niraj Shah
Niraj Shah

Reputation: 15457

If you are changing the default route to /hello, you need to make sure you visit http://localhost/laracast/public/hello in the browser.

If you are just trying to display your own message, change the default route to:

Route::get('/', function() {    
    return 'Welcome to Laracast';
});

i.e. remove hello from the route and it will correctly display your welcome message when visiting http://localhost/laracast/public

Upvotes: 1

Related Questions