Sorry at first I missed it was for an API. Perhaps change category to Vue.
See
https://drive.google.com/file/d/0B1_PFw--3o74YjVreHNBOWU2aEE/view
You have to pass the "filters" in the url or query string.
Also see
https://laracasts.com/discuss/channels/laravel/filter-and-pagination-1
and
https://laracasts.com/discuss/channels/laravel/laravel-5-query-builder-search-filter
$query = Dog::where('dogname', 'like', $dogsch);
if ($aval == "n") {
$query->where('adopted', '=', 1);
} else if ($aval == "y") {
$query->where('adopted', '=', 0);
}
$dogs = $query->orderBy('lastedit', 'DESC')->paginate(5);
$params = array('psch' => $dogsearch, 'aval' => $aval);
$title = 'Admin';
return view('dog.index', compact('dogs', 'params'))
->with('title', $title);
view:
{{ $dogs->appends($params)->links() }}
Gives
somesite.com/dogs?page=2&psch=b&aval=1
In other words a query string.
If NOT using query string, you "build" parameters in your uri and pass as route parameters.
Jeffrey has video lessons, and there's documentation.
Just example, you should setup query scopes.