10 Underused Laravel Blade Directives

Adi
Adi
Jan 31 · 2 min read

Laravel Blade is the template engine that’s built into the framework. It makes working with HTML a breeze. I have been working with Laravel for more than a year, but never realized some of Blade’s features. I want to share with you 10 underused blade directives that will clean up your code and save some time in the process. Let’s get going.

Check out LaravelCollections.com — an ever growing collection of great Laravel resources

@forelse

@each

@json

@verbatim

@isset & @ empty

@php

@push & @stack

@inject

@includeWhen

@hasSection

Conclusion

I hope these tips help you write better Blade views. If you have a tip do, share with us. I have linked to a few resources, which will help you take you Laravel skill to the next level.

Thanks for reading, share this article with people who might be interested.
This has been Adi — Simplest Web


Originally published at simplestweb.in.

Adi

Written by

Adi

I am a freelance web and mobile developer. More about me at https://simplestweb.in

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade