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
For Laravel version >=5.7
{{ $value ?? '' }}
For Laravel version <5.7
{{ $value or '' }}