DataTablesServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 23
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 10 1
A boot() 0 2 1
1
<?php
2
3
namespace AdMos\DataTables;
4
5
use Illuminate\Database\DatabaseManager;
6
use Illuminate\Support\ServiceProvider;
7
8
class DataTablesServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Register the service provider.
12
     *
13
     * @return void
14
     */
15
    public function register()
16
    {
17
        $app = $this->app;
18
19
        $app->alias('datatables', DataTables::class);
20
21
        $app->singleton('datatables', function () use ($app) {
22
            return new DataTables(
23
                $app->make('request'),
24
                $app->make(DatabaseManager::class)
25
            );
26
        });
27
    }
28
29
    public function boot()
30
    {
31
        //
32
    }
33
}
34