Completed
Push — master ( cdad02...2b0328 )
by Elf
07:32
created

DatatablesServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace App\Support\Datatables;
4
5
use App\Support\Datatables\Html\Builder as HtmlBuilder;
6
use Illuminate\Support\ServiceProvider;
7
8
/**
9
 * Datatables Customization.
10
 *
11
 * You must register this provider **after** the original Yajra providers.
12
 */
13
class DatatablesServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * Indicates if loading of the provider is deferred.
17
     *
18
     * @var bool
19
     */
20
    protected $defer = true;
21
22
    /**
23
     * Register the service provider.
24
     */
25 1
    public function register()
26
    {
27
        // Replace html builder binding.
28
        // See Yajra\Datatables\HtmlServiceProvider
29 1
        $this->app->bind('datatables.html', HtmlBuilder::class);
30 1
    }
31
32
    /**
33
     * Get the services provided by the provider.
34
     *
35
     * @return string[]
36
     */
37
    public function provides()
38
    {
39
        return ['datatables.html'];
40
    }
41
}
42