Level 30
You can call artisan commands programmatically. This should work:
Artisan::call('config:clear');
https://laravel.com/docs/master/artisan#programmatically-executing-commands
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, i would know if we could delete cache manually without command "php artisan config:clear"
Please or to participate in this conversation.