Commaaa2
This commit is contained in:
22
vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php
vendored
Normal file → Executable file
22
vendor/laravel/framework/src/Illuminate/Pagination/PaginationServiceProvider.php
vendored
Normal file → Executable file
@@ -29,26 +29,6 @@ class PaginationServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
Paginator::viewFactoryResolver(function () {
|
||||
return $this->app['view'];
|
||||
});
|
||||
|
||||
Paginator::currentPathResolver(function () {
|
||||
return $this->app['request']->url();
|
||||
});
|
||||
|
||||
Paginator::currentPageResolver(function ($pageName = 'page') {
|
||||
$page = $this->app['request']->input($pageName);
|
||||
|
||||
if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) {
|
||||
return (int) $page;
|
||||
}
|
||||
|
||||
return 1;
|
||||
});
|
||||
|
||||
Paginator::queryStringResolver(function () {
|
||||
return $this->app['request']->query();
|
||||
});
|
||||
PaginationState::resolveUsing($this->app);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user