Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel loop iteration pagination

@forelse ($datatabel as $data)
  <tr>
  	<td>{{ $datatabel->firstItem() + $loop->index }}</td>
  </tr>
@empty
  <tr>
  	<td>No Data Available</td>
  </tr>
@endforelse
Comment

Laravel loop iternation pagination issue

@foreach ($faqs as $faq)

	{{$loop->iteration + $faqs->firstItem() - 1}}
  
@endforeach

Note: Change the "$faqs" to your collection
Comment

PREVIOUS NEXT
Code Example
Php :: php while loop array 
Php :: laravel drop multiple columns 
Php :: laravel create project thorugh composer 
Php :: laravel eloquent get 3 months 
Php :: php return json response with status code 
Php :: how to fetch jQuery in wordpress 
Php :: php str_pad not working 
Php :: how to get all rows from a table except some rows in laravel 
Php :: php serve 
Php :: php check if string contains number 
Php :: empty table in laravel 
Php :: how to get all roles in wordpress 
Php :: how to display array of img in wordpress 
Php :: php get first last loop 
Php :: php search in array case insensitive 
Php :: php download rate limit 
Php :: run laravel mix 
Php :: get user avatar wordpress 
Php :: install php linux nginx command line 
Php :: laravel get full url with parameters 
Php :: get number of chars ina string php 
Php :: laravel avoid logged in user to access a page 
Php :: laravel migration change column length 
Php :: boot method laravel life cycle 
Php :: Install the php_mysql extensions 
Php :: php array join 
Php :: php remove charictors from a string 
Php :: migration status php 
Php :: laravel print log 
Php :: ubuntu set alternatives 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =