Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Laravel\Sail;
4
 
5
use Illuminate\Contracts\Support\DeferrableProvider;
6
use Illuminate\Support\ServiceProvider;
621 lars 7
use Laravel\Sail\Console\AddCommand;
148 lars 8
use Laravel\Sail\Console\InstallCommand;
9
use Laravel\Sail\Console\PublishCommand;
10
 
11
class SailServiceProvider extends ServiceProvider implements DeferrableProvider
12
{
13
    /**
14
     * Bootstrap any application services.
15
     *
16
     * @return void
17
     */
18
    public function boot()
19
    {
20
        $this->registerCommands();
21
        $this->configurePublishing();
22
    }
23
 
24
    /**
25
     * Register the console commands for the package.
26
     *
27
     * @return void
28
     */
29
    protected function registerCommands()
30
    {
31
        if ($this->app->runningInConsole()) {
32
            $this->commands([
33
                InstallCommand::class,
621 lars 34
                AddCommand::class,
148 lars 35
                PublishCommand::class,
36
            ]);
37
        }
38
    }
39
 
40
    /**
41
     * Configure publishing for the package.
42
     *
43
     * @return void
44
     */
45
    protected function configurePublishing()
46
    {
47
        if ($this->app->runningInConsole()) {
48
            $this->publishes([
49
                __DIR__ . '/../runtimes' => $this->app->basePath('docker'),
50
            ], ['sail', 'sail-docker']);
51
 
52
            $this->publishes([
53
                __DIR__ . '/../bin/sail' => $this->app->basePath('sail'),
54
            ], ['sail', 'sail-bin']);
55
        }
56
    }
57
 
58
    /**
59
     * Get the services provided by the provider.
60
     *
61
     * @return array
62
     */
63
    public function provides()
64
    {
65
        return [
66
            InstallCommand::class,
67
            PublishCommand::class,
68
        ];
69
    }
70
}