The or helper is been removed in 5.7.
You should use the Null Coalesce Operator: ??
So you'll be left with {{ $title ?? 'Default page title' }}
As said in the title, when i use or keyword in blade template, i get variable undefined variable error. Here is the example:
{{ $title or 'Default page title' }}
Why this doesn't work? It is in Laravel docs. PHP 7.2, Laravel 5.7. Am i missing something?
The or helper is been removed in 5.7.
You should use the Null Coalesce Operator: ??
So you'll be left with {{ $title ?? 'Default page title' }}
Please or to participate in this conversation.