adamwathan / form

Super basic form HTML builder, only really exists so I can pull it in for some other more useful projects.
MIT License
232 stars 117 forks source link

Feature Request: Support url resolution of controller methods #57

Closed nodefortytwo closed 8 years ago

nodefortytwo commented 9 years ago

It would be nice to be able to pass in controller method names or route names such as Auth\AuthController@postLogin either into the action method of form open or another method such as route()

open()->action(action('Auth\AuthController@postSms')) seems messy

adamwathan commented 9 years ago

Hey! Since this package isn't Laravel-only unfortunately I can't easily add this feature. action in terms of the attribute on the form element just refers to the endpoint URL, while in Laravel it means a reverse-resolved controller action URL, so I'm not sure what the API would be even if I wanted to add it.

Are you using this package directly or the BootForms extension? Could probably make a light wrapper for this form builder that added support for controller actions and route resolution. Lemme think about it :+1:

nodefortytwo commented 9 years ago

I am using the BootForms extension (I didn't know of the basic forms package until I saw the dependency)

I am probably going to have to extend the BootForms lib myself for our specific use case so its not really a big issue, just a nice to have really.

thanks for the great library.