LaravelPagesServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace JeroenG\LaravelPages;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * This is the service provider for Laravel.
9
 *
10
 * Place the line below in the providers array inside app/config/app.php
11
 * <code>'JeroenG\LaravelPages\LaravelPagesServiceProvider',</code>
12
 * And this line into the alias array in the same file
13
 * <code>'LPages' => 'JeroenG\LaravelPages\Facades\LaravelPages',</code>
14
 *
15
 * @author 	JeroenG
16
 **/
17
class LaravelPagesServiceProvider extends ServiceProvider
18
{
19
    /**
20
     * Indicates if loading of the provider is deferred.
21
     *
22
     * @var bool
23
     */
24
    protected $defer = false;
25
26
    /**
27
     * Bootstrap the application events.
28
     *
29
     * @return void
30
     */
31
    public function boot()
32
    {
33
        $this->loadMigrationsFrom(__DIR__.'/../migrations');
34
    }
35
36
    /**
37
     * Register the service provider.
38
     *
39
     * @return void
40
     */
41
    public function register()
42
    {
43
        $this->app->singleton('laravelpages', function ($app) {
44
            return new LaravelPages;
45
        });
46
    }
47
48
    /**
49
     * Get the services provided by the provider.
50
     *
51
     * @return array
52
     */
53
    public function provides()
54
    {
55
        return ['laravelpages'];
56
    }
57
}
58