Create IF and SWITCH Statements With Blade Displaying data is one thing, but Blade has directives such as PHP’s if and switch statements. Blade directives are just shortcuts for implementing PHP code. You can even create your own Blade Directives, and we’ll look at that much later. For now, let’s focus on the built in ones: @if and @switch. Read the previous article on Displaying Data in Blade Files. @if Directive As mentioned above, blade directives replicate actual PHP code. The regular PHP way of writing an if statement is: <?php if ($something == true) { // Do something here } PHP also has the elseif and else statements that pair up with