Level 51
What do you mean by highlight? If want to change the CSS styling you can do a conditional statement in your view
@if( $vehicule->adtype == 1 )
<div style="adtype 1 styling">
@else
<div style="adtype 0 styling ">
@endif
However if you want the items sorted by adtype so all the 1's appear at the top e.g. a premium listing you can order your vehicles in the query
$vehicles = Vehicle::with('uploads')
->orderBy('adtype', 'desc') // add this (if you want 0 at the top change desc to asc)
->get();
1 like