Closed binaryk closed 13 hours ago
Introduction of "Default Stored Value" Section
A new section called "Default Stored Value" has been added to fields.md
, it will help users understand how to set default values for fields using either a callback or value.
New Property fillDefaultCallback
A new property named fillDefaultCallback
has been included in Field.php
, it's designed to store the callback which returns the default value.
New Method defaultCallback
The Field.php
file now has a new method named defaultCallback
. This method accepts either a callable function or a value to be used as a default.
Changes to fillAttribute
Method
The fillAttribute
method in Field.php
has been updated to use the newly introduced method fillAttributeFromDefault
. This change should improve the assignment of default values.
Adding fillAttributeFromDefault
Method
A new method fillAttributeFromDefault
has been created in Field.php
, allowing for default values to be assigned to an attribute that is not yet set.
Refactoring of Validation Rules in File.php
Modification to the validation rules in File.php
has been refactored to use the helper function named str()
for string checks. This refinement should improve the process of conducting string validations.
Added
add defaultCallback method