/**
* List of model fields displayed in form
*
* ```php
* return [
* 'id' => [
* 'class' => Input::className(),
* ],
* 'username' => [
* 'class' => Input::className(),
* ],
* 'status' => [
* 'class' => Select::className(),
* 'items' => [User::STATUS_ACTIVE => 'Active', User::STATUS_DELETED => 'Deleted'],
* ],
* ];
* ```
*
* Default is all model attributes with class = Input
*
* @return array
*/
public function fields()
{
$fields = [];
foreach ($this->model->attributes() as $attribute) {
$fields[$attribute] = ['class' => Input::className()];
}
return $fields;
}