Beispiel #1
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->instance('cocona', $cocona = new Cocona($this->app));
     $this->app->singleton('cocona.packages', function () {
         return Package::all();
     });
     $loader = AliasLoader::getInstance();
     foreach ($this->providers as $provider) {
         $this->app->register($provider);
     }
     $loader->setAliases($this->aliases);
 }
Beispiel #2
0
 /**
  * @param PackageInterface $package
  * @return mixed
  */
 protected function destroy(PackageInterface $package)
 {
     return Package::where('name', $package->getPrettyName())->delete();
 }