'Why config cache not working on my shared hosting in Laravel 8
I uploaded my laravel site in shared hosting, my site is working well in localhost, but the CSS is not working on the server. I want to clear cache but not run artisan command in shared hosting. I tried following.
// Clear route cache:
Route::get('/route-clear', function () {
$exitCode = Artisan::call('route:clear');
return 'Routes cache cleared';
});
// Clear config cache:
Route::get('/config-cache', function () {
$exitCode = Artisan::call('config:cache');
return 'Config cache cleared';
});
// Clear application cache:
Route::get('/clear-cache', function () {
$exitCode = Artisan::call('cache:clear');
return 'Application cache cleared';
});
// Clear view cache:
Route::get('/view-clear', function () {
$exitCode = Artisan::call('view:clear');
return 'View cache cleared';
});
Solution 1:[1]
Go to the ProjectFolder/bootstrap/cache then rename config.php to anything you want eg. config.php_old and reload your site
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Sumon |