Skip to content

FormObjects #1

@codeflorist

Description

@codeflorist

Implement "FormObjects" as central SOA for a form. FormRequestObjects (Rules), HTML and JS are automatically generated to provide a wide set of pre-defined features.

FormObjects are Injected into (both get and post) Controller methods:

In get-method they can be handed over to the view, which can call a generate() on it to generate the actual HTML. JS code is generated automatically with Catch-all function at the end of master template.

In post-methods they function just like FormRequestObjects for validation and provide additional helpers for the controller (e.g. returnSuccess() and returnError() , validation-helpers, etc.).

Artisan Command to generate form-object with boilerplate (e.g. form:create ContactForm).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions