Foreign key is now null and when mapping through the data it say "Attempt to read property "$category_name" on null" – Laravel
I deleted a category which is an f-key of the items table. Now the view has an error saying 'Attempt to read property "category_name" on null'. How do I render a null foreign key? I tried if-else: @if({{$item->category->category_name}} === 'null')…