I just started learning Laravel, and I faced an issue. I made two view files. The first one is home.blade.php and the second one is welcome.blade.php. In the routes folder, web.php, I used the Route::redirect('/home', '/welcome');
redirect method, which redirects me to the welcome file. When I write in the localhost URL like this http://127.0.0.1:8000/home, it correctly redirects me to the welcome view page, and the URL changes to http://127.0.0.1:8000/welcome. But then I removed the redirect method code and also deleted the welcome view page, yet it still redirects me to the welcome page when I write home in the URL. I asked ChatGPT, and it told me to run the PHP artisan commands to clear the cache and the view. I did exactly the same, but after this, I still face the same issue. When I write home in the URL, it redirects me to the welcome page, which doesn’t even exist and shows a 404 error.
I want that when I write home in the URL, it opens the home.php file and not redirects me to the welcome.php file, which doesn’t even exist.
I just started learning Laravel, and I faced an issue. I made two view files. The first one is home.blade.php and the second one is welcome.blade.php. In the routes folder, web.php, I used the Route::redirect('/home', '/welcome');
redirect method, which redirects me to the welcome file. When I write in the localhost URL like this http://127.0.0.1:8000/home, it correctly redirects me to the welcome view page, and the URL changes to http://127.0.0.1:8000/welcome. But then I removed the redirect method code and also deleted the welcome view page, yet it still redirects me to the welcome page when I write home in the URL. I asked ChatGPT, and it told me to run the PHP artisan commands to clear the cache and the view. I did exactly the same, but after this, I still face the same issue. When I write home in the URL, it redirects me to the welcome page, which doesn’t even exist and shows a 404 error.
I want that when I write home in the URL, it opens the home.php file and not redirects me to the welcome.php file, which doesn’t even exist.
Share Improve this question edited Jan 18 at 2:40 skdishansachin 7245 silver badges21 bronze badges asked Jan 17 at 17:48 Muhammad ShehrozMuhammad Shehroz 12 bronze badges 5 |1 Answer
Reset to default 0Just clear browser cache. I faced same problem and fixed by clearing browser data.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745351211a4623843.html
storage/framework/views
,storage/framework/cache
andbootstrap/cache
folders in case there are any persistent files in there that should be deleted as well (assuming this is indeed a caching issue and there's nothing else going on) – apokryfos Commented Jan 17 at 18:57