Home > Enterprise >  web.php already saved but still given the wrong route
web.php already saved but still given the wrong route

Time:10-12

I'm sorry if you are confused or misunderstood because i can't explain it very well. I already saved my web.php but i didn't know why it won't read my new saved web.php. it will read my previously saved web.php which is the view of login.blade.php, my new saved web.php is the view of download.blade.php and it still the view of login.blade.php. i thought that maybe it always return to the view of my previously saved web.php.

Previously in web.php:

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

Previously in the terminal

/css/login.css

New saved web.php:

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

After saved web.php in terminal:

/css/login.css

And after i make a new route like:

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

and when i use /help it says that 404|Page Not Found And of course i already make the new help.blade.php and the css

Please help thank you

Here's the code in web.php

CodePudding user response:

You can use php artisan route:list to show which routes have been set from your web.php. If changes in your web.php don't reflect in that list or on your site chances are your routes are cached. In that case, run

php artisan route:clear

to clear the cache and re-read from your web.php file.

More on the topic: Route Caching

CodePudding user response:

Try php artisan route:clear to remove the route cache file Or php artisan optimize:clear to remove the cached bootstrap files (all cached from your app)

  • Related