Flashes Home Search Notifications Sign in Post
Chris Kankiewicz @phlak.dev · Nov 4

Hey #Laravel people, is this the best way to set default values for Model attributes on object instantiation? Am I missing an obvious alternative solution?

2 likes 1 replies

?

Replies

RVxLab · Nov 5

Define an $attributes property on your model and put the defaults in there. laravel.com/docs/12.x/el...

Legal

Privacy Policy Terms and Conditions

Contact

Support FAQs

Follow

Bluesky Instagram Threads
Flashes for Bluesky Get it on the App Store