UpoloServiceProvider::boot()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 3
nc 4
nop 0
1
<?php
2
3
namespace Hamidrezaniazi\Upolo;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class UpoloServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        if (method_exists($this, 'loadFactoriesFrom')) {
15
            $this->loadFactoriesFrom(__DIR__.'/../database/factories');
0 ignored issues
show
Deprecated Code introduced by
The method Illuminate\Support\Servi...er::loadFactoriesFrom() has been deprecated with message: Will be removed in a future Laravel version.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
16
        }
17
18
        if (! class_exists('CreateModelHistoriesTable')) {
19
            $this->publishes([
20
                __DIR__.'/../database/migrations/create_files_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_files_table.php'),
21
            ], 'migrations');
22
        }
23
    }
24
25
    /**
26
     * Register the application services.
27
     */
28
    public function register()
29
    {
30
        $this->app->singleton('upolo', function () {
31
            return new UpoloSkeleton();
32
        });
33
    }
34
}
35