Skip to content

Laravel Eloquent Relationship

Model: Record (id,user_id, status_id, date, note, timestamp)

Model: Status(id,name)

If you try to access it directly like this {{$record->status->name }} it will return “Trying to get property of non-object”.

You need to access the user status value like this in view

 

Published inGeneralICT

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

{"value":"\n