Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Laravel loop with counter

 @foreach($rows as $row)
            <tr>
                <td>{{ $loop->iteration }}</td>
                <td>{{ $row->item1}}</td>
                <td>{{ $row->item2}}</td>
            </tr>
 @endforeach
Comment

Laravel loop with counter

@foreach($items as $key => $item)
  <tr>
  	<td>{{ $loop->iteration }}</td> //its like serial of row 
  	<td>{{ $item->name }}</td>
  	<td>{{ $item->email }}</td>
  </tr>
@endforeach
Comment

PREVIOUS NEXT
Code Example
Php :: how to get only decimal value in php 
Php :: how to save file in storage folder in laravel 
Php :: Download multiple files as zip in PHP 
Php :: php top frameworks 
Php :: validation not exists with this id laravel 
Php :: how to add property to an object in php 
Php :: delete record using laravel 
Php :: How to create a controller in laravel 
Php :: concat function using laravel update query 
Php :: how to know the path of php in linux 
Php :: php mongodb version cmd 
Php :: laravel check if model relation exists 
Php :: Remove public or index file from url in laravel 
Php :: php failed to open stream: Permission denied iis 
Php :: convert multidimensional array to single array php 
Php :: php basename from path 
Php :: php remove array element reset keys 
Php :: get last word from string php 
Php :: wordpress max post revision 
Php :: Laravel randomise data from database 
Php :: php pdo update 
Php :: php date from format 
Php :: connect to sql database 
Php :: php combine arrays 
Php :: php date first day of month and last month 
Php :: laravel ckeditor 
Php :: install phpstorm in ubuntu stable 
Php :: php array filter only null 
Php :: download html content from url php 
Php :: base url laravel 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =