Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ViewServiceProvider
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 boot
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Providers;
4
5use Illuminate\Pagination\Paginator;
6use Illuminate\Support\ServiceProvider;
7use Illuminate\Support\Facades\View;
8
9class 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}