I am a beginner in this universe, and I am caught up in my development in a simple function that I can not understand. This code below gets a value from the database, and I would like the background cell to change by value, for example if the field for = 1
then the cell will be green .
<tbody>
@foreach($estoques as $row)
<tr>
<th scope="row">{{ $row->id }}</th>
<td>{{ $row->categoria->nome }}</td>
<td>{{ $row->cor }}</td>
<td>{{ $row->produto }}</td>
<td>{{ $row->marca }}</td>
<td>{{ $row->qtd }}</td>
<td>{{ $row->observacao }}</td>
</tr>
@endforeach
</tbody>