also list your routes using artisan route or artisan routes (or whatever the right syntax is) to check what routes are registered.. hierarchy also matters in routes.php
astroanu said:
clear application cache php artisan cache:clear
I've tried that and no luck.
I have a this in my routes file:
Route::get('/', function () { return view('welcome'); });
When I run php artisan route:list I get this:
|| Domain || Method || URI || Name || Action || Middleware ||
|| .... || Get|Head || / || ... || Closure || ... ||
so have u tried changing view(welcome) to another?
also, you havent added new routes so how do you expect laravel to go to right routes??
shez1983 said:
so have u tried changing view(welcome) to another?
also, you havent added new routes so how do you expect laravel to go to right routes??
I've deleted the welcome file and made a completely different one. I just started a new project and told it to return('pages.home'). And it still does the same thing. I've cleared the route cache, configuration cache, and the application cache.
If you have deleted the welcome.blade.php file then it should never display that page again. It will throw an error instead. Try clearing cookies of your browser or try and open the domain in a private browser.
If your route is defined to redirect to pages.home then I assume you know that you will need to create a pages folder in your views directory and pages.blade.php file in it.
Also try returning a view from using a controller instead of directly retunrnig from your routes file.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community