Subversion-Projekte lars-tiefland.laravel_shop

Revision

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