I need to specify my styles under certain conditions
<div class="flex-container">
@foreach($topServers as $server)
<div class="flex-item">
<div class="row">
@foreach($guilds as $guild)
@if($server->id == $guild->id)
<img class="col-md-auto avatar" src="..." alt="">
@endif
@endforeach
</div>
</div>
@endforeach
</div>
Provided that $server->premium >= 1, you need to specify the "border-color:gold" styles in the div class="flex-item"
And I absolutely do not understand how to implement it, thank you in advance for your help
>Solution :
Just use a ternary to add a style.
<div class="flex-item" {{ $server->premium >= 1 ? 'style="border-color:gold"' : '' }}>