This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this post I will show you about how to add Switch Case to Laravel 5.x blade template engine. | |
On app/Providers/AppServiceProvider.php do following steps: | |
use Illuminate\Support\Facades\Blade; | |
On function function boot() add following line: | |
// Switch case directive | |
Blade::extend(function($value, $compiler){ |