Skip to content

Instantly share code, notes, and snippets.

@fsuuaas
Created August 1, 2018 15:24
Show Gist options
  • Save fsuuaas/f61d7ca015801fc7ac52775b07aefb47 to your computer and use it in GitHub Desktop.
Save fsuuaas/f61d7ca015801fc7ac52775b07aefb47 to your computer and use it in GitHub Desktop.
//Clear Cache facade value:
Route::get('/clear-cache', function() {
$exitCode = Artisan::call('cache:clear');
return '<h1>Cache facade value cleared</h1>';
});
//Clear Route cache:
Route::get('/route-clear', function() {
$exitCode = Artisan::call('route:clear');
return '<h1>Route cache cleared</h1>';
});
//Clear View cache:
Route::get('/view-clear', function() {
$exitCode = Artisan::call('view:clear');
return '<h1>View cache cleared</h1>';
});
//Clear Config cache:
Route::get('/config-cache', function() {
$exitCode = Artisan::call('config:cache');
return '<h1>Clear Config cleared</h1>';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment