Support the ongoing development of Laravel.io →
Cache Eloquent
Last updated 4 months ago.
0

you can move your code into a Model Observer http://laravel.com/docs/eloquent#model-observers

Last updated 4 months ago.
0

zenry said:

you can move your code into a Model Observer http://laravel.com/docs/eloquent#model-observers

Where is the best way to declare User::observe(new UserObserver); ?

Last updated 4 months ago.
0

Tavicu said:

zenry said:

you can move your code into a Model Observer http://laravel.com/docs/eloquent#model-observers

Where is the best way to declare User::observe(new UserObserver); ?

ServiceProvider -> boot() method

Last updated 4 months ago.
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

tavicu tavicu Joined 31 Jan 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.