public function boot()
 {
     // configuration
     $this->mergeConfigFrom(__DIR__ . '/../config/webserver.php', 'webserver');
     $this->publishes([__DIR__ . '/../config/webserver.php' => config_path('webserver.php')], 'webserver-config');
     // adds views
     $this->loadViewsFrom(__DIR__ . '/../views', 'webserver');
     // migrations
     $this->publishes([__DIR__ . '/../database/migrations/' => database_path('/migrations')], 'migrations');
     Website::observe(new Observers\WebsiteObserver());
     SslCertificate::observe(new Observers\SslCertificateObserver());
     Hostname::observe(new Observers\HostnameObserver());
     /*
      * Ssl repository
      */
     $this->app->bind('Hyn\\Webserver\\Contracts\\SslRepositoryContract', function ($app) {
         return new SslRepository(new SslCertificate(), new SslHostname());
     });
     /*
      * Toolbox command
      */
     $this->app->bind('hyn.webserver.command.toolbox', function ($app) {
         return new Commands\ToolboxCommand($app->make(WebsiteRepositoryContract::class));
     });
     $this->commands(['hyn.webserver.command.toolbox']);
 }
Exemple #2
0
 /**
  * Publish path for specific filetype.
  *
  * @param string $postfix
  *
  * @return string
  */
 protected function publishPath($postfix = 'key')
 {
     return $this->certificate->publishPath($postfix);
 }