/** * 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); }
/** * @param PackageInterface $package * @return mixed */ protected function destroy(PackageInterface $package) { return Package::where('name', $package->getPrettyName())->delete(); }