/
home
/
obinna
/
html
/
app
/
app
/
Providers
/
Upload File
HOME
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Collection; use Illuminate\Pagination\Paginator; use Illuminate\Pagination\LengthAwarePaginator; class AppServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { // } /** * Bootstrap any application services. * * @return void */ public function boot() { // if (!Collection::hasMacro('paginate')) { Collection::macro('paginate', function ($perPage = 8, $page = null, $options = []) { $page = $page ?: (Paginator::resolveCurrentPage() ?: 1); return (new LengthAwarePaginator( $this->forPage($page, $perPage), $this->count(), $perPage, $page, $options)) ->withPath(''); }); } } }