Laravel Form Macro to Easily Wrap Form Elements

This trick is handy for wrapping all of your form elements with the same HTML/classes, which is especially useful for handling error states when using frameworks like Bootstrap or Foundation.

  • Matthew Henley

    This really does clean up building forms in templates, however I don’t like building html strings directly in my codebase so I’m keeping these in a seperate blade template, the macro then returns the result of View::make.

    Bookmarked your site Chris, I love the style and information withinin your writing.