laravel 8 artisan command in route code example
Example: execute artisan command from route
Route::get('clear_cache', function () {
\Artisan::call('cache:clear');
dd("Cache is cleared");
});
Route::get('clear_cache', function () {
\Artisan::call('cache:clear');
dd("Cache is cleared");
});