fwrite(): Write of 1905 bytes failed with errno=28 No space left on device
im using laravel 8
im uploaded the laravel project to the hosting
and i check the storage, the storage is not full
how to fix this problem
before i run this code, but still not work
Route::get('/clear', function() {
Artisan::call('cache:clear');
Artisan::call('config:cache');
Artisan::call('view:clear');
return "Cleared!";
});
@jlrdw
i am trying to clear the log by the routes cause i can't use artisan. But it still don't work
here's the code
Route::get('/clear', function() {
Artisan::call('config:cache');
Artisan::call('cache:clear');
Artisan::call('config:clear');
Artisan::call('view:clear');
Artisan::call('route:clear');
exec('rm -f ' . storage_path('logs/.log'));
exec('rm -f ' . base_path('.log'));
return "Cache is cleared";
})->name('clear.cache');
just empty laravel.log
echo "" > storage/logs/laravel.log
for permanent solutions
Artisan::command('logs:clear', function() {
exec('rm -f ' . storage_path('logs/*.log'));
exec('rm -f ' . base_path('*.log'));
$this->comment('Logs have been cleared!');
})->describe('Clear log files');
Please or to participate in this conversation.