P
P
Pavel2020-01-16 17:29:28
Laravel
Pavel, 2020-01-16 17:29:28

Displaying information, binding with, or ' ' in laravel 6?

Hello!
On Laravel 5.6, I always used bundles and their output:

@forelse($с->orders as $o)
      {{$o->order_customer->name or 'Пусто!'}}
@empty
@endforelse

accordingly, if it $o->order_customer->namegives nullit, it naturally works or '' and its value is displayed
And in laravel 6 if $o->order_customer->name- empty - it shows "1", stupid number 1
What to do with this, how to fix it, who will tell you?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel, 2020-01-16
@yatort

or ''must be replaced by a ??
missed moment when it orwent out of fashion

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question