Post
Define an $attributes property on your model and put the defaults in there. laravel.com/docs/12.x/el...
laravel.comEloquent: Getting Started - Laravel 12.x - The PHP Framework For Web ArtisansLaravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
For UUIDs you’ll want to look at the HasUuids trait instead of defining it in the defaults. laravel.com/docs/12.x/el...
laravel.comEloquent: Getting Started - Laravel 12.x - The PHP Framework For Web ArtisansLaravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Thanks! The example was contrived but was there to illustrate the need to call some arbitrary method.
0 reposts1 like
No replies yet.