Support the ongoing development of Laravel.io →
Database Views Blade
Last updated 2 years ago.
0

Have you confirmed the key status exists in the data being sent to the view, as the error says "Undefined property", which usually means it does not exist in the paginated results.

I think you could do a this and see if status is in the results.

@foreach($complaints as $complaint)
{{ dd($complaint) }}
0

I got the solution: @if($complaint->status === 0 ) <td>Pending</td> @else <td>Viewed</td> @endif

$compaint->status is right... not $compaints->status

0

Sign in to participate in this thread!

Eventy

Your banner here too?

anooptu anooptu Joined 15 Mar 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.