03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Access Control List 44<br />

1 {{ Form::label("name", "Name") }}<br />

2 {{ Form::text("name", Input::old("name"), [<br />

3 "placeholder" => "new group"<br />

4 ]) }}<br />

We’ve already seen this type of Blade template syntax before. The label and text helpers are great<br />

for programatically creating the markup we would otherwise have to create; but sometimes it is nice<br />

to be able to create our own markup generators for commonly repeated patterns.<br />

What if we, for instance, often use a combination of label, text and error message markup? It would<br />

then be ideal for us to create what’s called a macro to generate that markup.<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!