I have a row in my table called "custom_orders_status" which is a dropdown with 3 options, I want when option1 is selected in my database the column in my view to be red but I can't get that option from database. How do I do that?
@foreach($dataTypeContent as $data)
<tr class="{{ $data->custom_order_status->option1 ? 'alert alert-danger': '' }}">
This is what I tried but it throw me this error: "Trying to get property 'option1' of non-object"