Join 25,000+ Laravel Developers and join the free Laravel Newsletter
Laravel Tutorials / updated: July 19, 2016

Booting Eloquent Model Traits

Simon Archer posted a new tutorial on booting Eloquent model traits:

If you have a static function on your trait, named boot[TraitName], it will be executed as the boot() function would on an Eloquent model. Which is a handy place to register your model events.

Read the full tutorial if you’d like to find more about booting traits.

This appeared first on Laravel News
Laravel News Partners


Join the weekly newsletter and never miss out on new tips, tutorials, and more.