Created
September 30, 2020 04:22
-
-
Save diaraujo13/fa2cec3a7cb36c764400be2d1b87900c to your computer and use it in GitHub Desktop.
Laravel - Criar uma rota para limpeza do cache da aplicação de forma que através do front podemos colocar um botão de ação para tal tarefa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cache clear route | |
Route::get( | |
'cache-clear', | |
function () { | |
\Artisan::call('config:cache'); | |
\Artisan::call('cache:clear'); | |
\Artisan::call('config:clear'); | |
return redirect()->back(); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment