I\'m trying to create blade directive which echo variable (if variable defined) or echo \"no data\" if variable undefined.
This is my code in AppServiceProvider.ph
AppServiceProvider.ph
Blade has a directive to check if a variable is set:
@isset($var) @endisset