blade directive pass variable code example
Example: make blade directive 2 parameters
Blade::directive('custom', function ($expression) {
$params = explode(',', $expression);
list($param1, $param2, $param3) = $params;
// Great coding stuff here
});