INANI El Houssain wrote a nice tutorial on how to build our own switch statement using Laravel's custom blade directives.

Switch Statement using Laravel custom directive

One of the good points of Laravel’s framework is that it allows you to make your own components, macros and directives. so today we will make use of Laravel’s Custom Blade directives and make something good.