Home

Awesome

SwitchBlade: Custom Directives for the Laravel Blade templating engine

Latest Stable Version Total Downloads Latest Unstable Version License

Install Via Composer

$ composer require awkwardideas/switchblade

Add to config/app.php

Under Package Service Providers Add

AwkwardIdeas\SwitchBlade\SwitchBladeServiceProvider::class,

Available Directives

Switch via Blade

A php switch statement implemented via blade.

The switch statement is similar to a series of IF statements on the same expression. In many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code depending on which value it equals to. This is exactly what the switch statement is for.


Variable Modification

Set, increment or decrement variables without having to go in and out of php.


Variable Output


Debug Tools


Other helpful directives

If empty

If null

Not Null

Optional Yield

File exists

Has Count

##Lang Modification

##Bag

Init Script