DataTablesServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
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