Laravel Blade Directives
Published on by Eric L. Barnes
Matt Stauffer has a new tutorial out on how to create custom Blade directives. These directives allow you to create your own Blade tags custom to your project.
Give this tutorial a read to learn more about directives and how you might simplify your app. Just don’t go overboard as Matt says:
Go wild. Well, don’t really go wild; you could end up confusing yourself and any current/future developers on the project. But allow yourself to extend the capabilities of Blade so you’re not repeating the same logic over and over, or resorting to inline <?php blocks.
Eric is the creator of Laravel News and has been covering Laravel since 2012.