marcmascarell/artificer

Declare Fields fluently

marcmascarell opened this issue · 0 comments

Right now, the way to declare fields is via configuration file.

It would be nice to declare Fields in a more fluent way.

For example:

Artificer::field(DateField::class)
->regex([
    '/_at$/'
])
->autodetect([
    'accept',
    'active',
    'boolean',
    'activated',
])->widgets([
    DateTimepicker::class
]);

This way we maybe could get rid of classmap fields config.