Hi,
I have some model event listeners that I don't want to be ran when I run a migration with artisan. Is there any way to detect if the current request is sent with artisan?
Can't seem to find anything about this anywhere.
You can check if running in console with: App::runningInConsole()
.
Thank you, that was exactly what I needed :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community