wendelladriel/laravel-lift
Experimental Laravel package that supercharges Eloquent models with typed public properties matching your schema, powered by PHP 8 attributes. Add validation rules and other metadata directly on models and access them via handy methods, using Eloquent events for easy drop-in use.
The defaultValues method returns an array with all the public properties that have a default value set.
If the default value is a function, the function name will be returned instead of the function result since this is a static call.
$productDefaultValues = Product::defaultValues();
// WILL RETURN
[
'price' => 0.0,
'promotional_price' => 'generatePromotionalPrice',
]
How can I help you explore Laravel packages today?