namespace App\Console\Commands; use Illuminate\Console\Command; use Illuminate\Support\Facades\Artisan; class RunConfigCommands extends Command { protected $signature = 'custom:run-config-commands'; protected $description = 'Run config commands directly'; public function handle() { // Run the commands you want directly Artisan::call('config:clear'); $this->info('Config cache cleared.'); Artisan::call('config:cache'); $this->info('Config cache rebuilt.'); } }