Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| ViewServiceProvider | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| boot | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Providers; |
| 4 | |
| 5 | use Illuminate\Pagination\Paginator; |
| 6 | use Illuminate\Support\ServiceProvider; |
| 7 | use Illuminate\Support\Facades\View; |
| 8 | |
| 9 | class ViewServiceProvider extends ServiceProvider |
| 10 | { |
| 11 | /** |
| 12 | * Bootstrap any application services. |
| 13 | * |
| 14 | * @return void |
| 15 | */ |
| 16 | public function boot(): void |
| 17 | { |
| 18 | // Set default view of the paginator. |
| 19 | Paginator::defaultView('modules.pagination'); |
| 20 | |
| 21 | View::share('nonce', $nonce = \uniqid()); |
| 22 | } |
| 23 | } |