Issues (6)

src/OtpifyServiceProvider.php (2 issues)

1
<?php
2
3
namespace PrasanthJ\Otpify;
4
5
use Illuminate\Support\ServiceProvider;
6
use PrasanthJ\Otpify\Commands\CleanOtps;
7
use PrasanthJ\Otpify\Otpify;
8
9
class OtpifyServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Register services.
13
     *
14
     * @return void
15
     */
16
    public function register()
17
    {
18
        $this->app->bind('Otpify', Otpify::class);
19
    }
20
21
    /**
22
     * Bootstrap services.
23
     *
24
     * @return void
25
     */
26
    public function boot()
27
    {
28
        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
29
30
        if ($this->app->runningInConsole()) {
31
            $this->commands([
32
                CleanOtps::class,
33
            ]);
34
        }
35
36
        $this->publishes([
37
            __DIR__ . '/../config/otpify.php' => config_path('otpify.php')
0 ignored issues
show
The function config_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
            __DIR__ . '/../config/otpify.php' => /** @scrutinizer ignore-call */ config_path('otpify.php')
Loading history...
38
        ], 'otpify-config');
39
40
        $this->publishes([
41
            __DIR__ . '/../database/migrations/' => database_path('migrations')
0 ignored issues
show
The function database_path was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

41
            __DIR__ . '/../database/migrations/' => /** @scrutinizer ignore-call */ database_path('migrations')
Loading history...
42
        ], 'otpify-migrations');
43
    }
44
}
45