Quantcast
Channel: Laravel News
Viewing all articles
Browse latest Browse all 1793

Booting Eloquent Model Traits →

$
0
0

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.


Booting Eloquent Model Traits is a post from Laravel News.


Viewing all articles
Browse latest Browse all 1793

Trending Articles