Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel pagination with search filter

// if $id has value it will include "where('id','<',$id) else will return all"
$wells = DB::table('well_s')
        ->when($id, function ($query, $id) {
            return $query->where('id','<',$id);
        })
        ->paginate(20);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #pagination #search #filter
ADD COMMENT
Topic
Name
9+4 =