I was wondering if there is a way to get just the attributes name? In the example I mean: id, name, user. I don´t need the values, just name of attributes.
app\models\Data Object
(
[_attributes:yii\db\BaseActiveRecord:private] => Array
(
[id] => 1
[name] =>
[user] =>
)
[_oldAttributes:yii\db\BaseActiveRecord:private] => Array
(
[id] => 1
[name] =>
[user] =>
)
)
Thanks!
array_keys($model->attributes);