Reputation: 91
I am facing route problem I am using laravel 5.4 and xampp. I use this address 'localhost/project/laravel/public' to go to home page. When I click on any link in navigation region, I get object not found. After clicking, address shows http://localhost/about
I edit home.blade.php as
href = "./" and "./about" By adding period
problem solved to some extent
but when I am on another page
e.g login page address is http://localhost/project/laravel/public/users/login
and if I want to go to contact page, again object not found message received
This time address is http://localhost/project/laravel/public/users/contact
I also tried href="{{ url('/contact')}}" in home.blade.php
The problem remains same.
and
php artisan serve
localhost:8000 gives 'unable to connect'
Please guide, thanks.
Upvotes: 0
Views: 1254
Reputation: 28
What you're doing is wrong, you aren't suppose to navigate to your project's public folder via the browser url... You just need to go to your laravel project folder and run Command prompt and type "php artisan serve". it will generate a url for you. entering that url on your browser will load your project properly and that way all links will work.
Upvotes: 1