Passing attributes as an array
I think it's worth supporting both types of entries, since the line view does not allow the declaration of lists (associative), tables or functions of closures
Current view:
/**
* @return array
*/
public function fields() : array
{
return [
'body' => 'tag:wysiwyg|name:body|max:255|required|rows:10',
];
}
Array type:
/**
* @return array
*/
public function fields() : array
{
return [
'body' => [
'tag' => 'wysiwyg',
'name' => 'body',
'max' => 255,
'required' => true,
'rows' => 10,
],
];
}