File manager - Edit - /var/www/html/spdc/api/app/Providers/AppServiceProvider.php
Back
<?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Collection; 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() { Collection::macro('paginate', function ($perPage = 15, $total = null, $page = null, $pageName = 'page'): LengthAwarePaginator { $page = $page ?: LengthAwarePaginator::resolveCurrentPage($pageName); return new LengthAwarePaginator( $this->forPage($page, $perPage)->values(), // @intelephense-ignore-line $total ?: $this->count(), // @intelephense-ignore-line $perPage, $page, [ 'path' => LengthAwarePaginator::resolveCurrentPath(), 'pageName' => $pageName, ] ); }); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings