Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Yii2: Setting default values for all attributes of a model

$customer = new Customer();
$customer->loadDefaultValues();
// $customer->xyz will be assigned the default value declared when defining the "xyz" column
Source by www.yiiframework.com #
 
PREVIOUS NEXT
Tagged: #Setting #default #values #attributes #model
ADD COMMENT
Topic
Name
3+6 =