Support the ongoing development of Laravel.io →
Cache Eloquent
Last updated 2 years ago.
0

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

Last updated 2 years 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 2 years 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 2 years ago.
0

Sign in to participate in this thread!

Eventy

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?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.