So the way I see it is that a good Laravel application should be very model- and event-driven.
I have a Model called Article
. I wish to send email alert
I might come after the battle, but If you do not want all the fuss of extending classes or creating traits, you might want to give a try to this file exploration solution.
Laravel 5.X solution
Beware the folder you choose to fetch the models should only contain models to make this solution to work
Do not forget to add the use File
app/Providers/AppServiceProvider.php
Hope it helps you write the less code possible!