dimanche 18 novembre 2018

Displaying text according to the ID of category LARAVEL

       @foreach($products as $product)
            <tr class="product">
            <td></td>
            <td>$</td>
            <td></td> 
            <td></td>
            <td><a href = 'delete/'><button type="button" class="btn btn-danger">Delete</button></a></td>
      @endforeach

Hi, how do program this code such that if the catagory_id = 1 "Sushi" is displayed and if catagory_id = 2 "Drinks" is displayed.

As of now this is the display: enter image description here

Database



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire