Completed
Push — master ( 279d4e...5d09e0 )
by Elf
02:49
created

DatatablesServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 29
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A provides() 0 4 1
1
<?php
2
3
namespace ElfSundae\Laravel\Support\Datatables;
4
5
use Illuminate\Support\ServiceProvider;
6
use ElfSundae\Laravel\Support\Datatables\Html\Builder as HtmlBuilder;
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
    public function register()
26
    {
27
        // Replace html builder binding.
28
        // See Yajra\Datatables\HtmlServiceProvider
29
        $this->app->bind('datatables.html', HtmlBuilder::class);
30
    }
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