Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare Fields fluently #15

Open
marcmascarell opened this issue Oct 8, 2016 · 0 comments
Open

Declare Fields fluently #15

marcmascarell opened this issue Oct 8, 2016 · 0 comments

Comments

@marcmascarell
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant