1 | <?php |
||
2 | |||
3 | namespace Signifly\Pagination; |
||
4 | |||
5 | use Illuminate\Http\Request; |
||
6 | use Illuminate\Support\ServiceProvider; |
||
7 | |||
8 | class PaginationServiceProvider extends ServiceProvider |
||
9 | { |
||
10 | /** |
||
11 | * Bootstrap the application events. |
||
12 | * |
||
13 | * @return void |
||
14 | */ |
||
15 | public function boot() |
||
16 | { |
||
17 | $this->publishes([ |
||
18 | __DIR__.'/../config/pagination.php' => config_path('pagination.php'), |
||
19 | ], 'pagination'); |
||
20 | |||
21 | $this->mergeConfigFrom(__DIR__.'/../config/pagination.php', 'pagination'); |
||
22 | |||
23 | Request::macro('paginationCount', function ($key = null) { |
||
24 | $defaultCount = config('pagination.defaultCount'); |
||
25 | $maximumCount = config('pagination.maximumCount'); |
||
26 | $paginationKey = $key ?? config('pagination.key'); |
||
27 | |||
28 | return min( |
||
29 | intval($this->query($paginationKey, $defaultCount)), |
||
0 ignored issues
–
show
|
|||
30 | $maximumCount |
||
31 | ); |
||
32 | }); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Register the service provider. |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | public function register() |
||
41 | { |
||
42 | } |
||
43 | } |
||
44 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.