Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel pagination

//For Pagination 
//Follow some steps

//1. set pagination value  in controller
DB::table('users') -> paginate(15)
  
//2 show pagination in blade file
@if ($items->hasPages())
    <div class="pagination-wrapper">
         {{ $items->links() }}
    </div>
@endif
      
      
//3. if you face css issue in blade file add write your css or just enable bootstrap for it
      
  //Open file -> app/Providers/AppServiceProvider.php
   //add use IlluminatePaginationPaginator; 
   // add below given line in boot function
     public function boot()
    {
        Paginator::useBootstrap();
        //
    }
      
   
  
  
  
 
PREVIOUS NEXT
Tagged: #laravel #pagination
ADD COMMENT
Topic
Name
4+5 =