jeudi 4 mai 2017

The serial number not getting increment

Here is my code,

  <tbody>
    <?php $j = 1; ?>
    @foreach($items as $item)
    <tr>
      <td class="text-right"></td>
      <td></td>
      <td></td>
      <td></td>
      <td class="text-center"><a href="" class="btn btn-warning"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a></td>
      <td class="text-center">
        {!! Form::open([
          'method' => 'DELETE',
          'route' => ['Conversion.destroy', $item->id]
          ]) !!}

          {!! Form::button('<i class="glyphicon glyphicon-remove"></i>', array('type' => 'submit', 'class' => 'btn btn-danger')) !!}

          {!! Form::close() !!}
        </td>
      </tr>
      @endforeach
      <?php $j++; ?>
    </tbody>

When i execute this code, the serial number remains 1 for addition of more values.. For each and every value that has been added was with serial number 1.. How to get the increment of values like 2,3,4.. so on??



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire