Reputation: 13
How can I use a command like php artisan clear:cache
, when deploying a laravel project in 000webhoso?
I tried to configured but still can't find out the solution
I need to clear the logs and cache, using migration
php artisan clear:cache
file_put_contents(C:\Users\FNRI\Desktop\final\storage\framework/sessions/Jutrm2SkTQTO8H0jB1wnGXm5y8HUd7siBBtjh8Jz): failed to open stream: No such file or directory
to get load my project
Upvotes: 0
Views: 734
Reputation: 21
That work at 100% add to routes/web in your Laravel project use: your domain/clear for solving any problems with cache
Route::get('/clear', function () {
Artisan::call('cache:clear');
Artisan::call('config:clear');
Artisan::call('view:clear');
Artisan::call('route:clear');
Artisan::call('clear-compiled');
Artisan::call('config:cache');
return '<h1>Cache facade value cleared </h1>';});
Upvotes: 1
Reputation: 15296
Go to directory bootstrap > cache > config.php Delete config.php file.
if you want to call php artisan clear:cache
then you may create it route file as well
Route::get('/clear-cache', function() {
Artisan::call('cache:clear');
// return what you want
});
Route::get('/clear-view', function() {
Artisan::call('view:clear');
// return what you want
});
Route::get('/clear-config', function() {
Artisan::call('config:clear');
// return what you want
});
run as
Upvotes: 2