When I try to render pagination getting this error.
ErrorException in AbstractPaginator.php line 377: call_user_func() expects parameter 1 to be a valid callback, no array or string given (View: C:\xampp\htdocs\project\resources\views\pages\app\file.blade.php) (View: C:\xampp\htdocs\project\resources\views\pages\app\file.blade.php) (View: C:\xampp\htdocs\project\resources\views\pages\app\file.blade.php)
Here is my code
$items = $this->repo->getData();
if(empty($items)){
return [];
}
$options['path'] = route('test');
$options['query'] = ['id' => 5];
$page = $page ?: (Paginator::resolveCurrentPage() ?: 1);
$items = $items instanceof Collection ? $items : Collection::make($items);
return new LengthAwarePaginator($items->forPage($page, $perPage), $items->count(), $perPage, $page, $options);
it was working in laravel 5.2 but stopped in 5.3
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ozfr5t
via IFTTT
Aucun commentaire:
Enregistrer un commentaire