/** * Execute the console command. * * @return void */ public function fire() { $package = $this->buildPackage(); $this->info('Creating workbench...'); $path = $this->laravel['path.base'] . '/workbench'; // A "plain" package simply does not contain the "views", "config" or any other // Laravel intended directories. Plain packages don't contain those types of // directories as they are primarily just plain libraries for consumption. $plain = $this->input->getOption('plain'); $workbench = $this->creator->create($package, $path, $plain); $this->info('Package workbench created!'); // If the "composer" option has been specified, we will call composer update for // the workbench so the dependencies will be installed and the classmaps get // generated for the package. This will allow the devs to start migrating. if ($this->input->getOption('composer')) { $this->comment('Installing dependencies for workbench...'); $this->callComposerUpdate($workbench); } }
/** * Run the package creator class for a given Package. * * @param \Illuminate\Workbench\Package $package * @return string */ protected function runCreator($package) { $path = $this->laravel['path.base'] . '/workbench'; $plain = !$this->option('resources'); return $this->creator->create($package, $path, $plain); }
/** * Load the raw service provider file. * * @param bool $plain * @param \Illuminate\Workbench\Package $package * @return string */ protected function getProviderFileFromPackage($plain, $package) { if (!isset($package->namespace) || empty($package->namespace)) { return parent::getProviderFile($plain); } if ($plain) { return $this->files->get(__DIR__ . '/stubs/plain.provider.stub'); } else { return $this->files->get(__DIR__ . '/stubs/provider.stub'); } }
/** * Run the package creator class for a given Package. * * @param \Illuminate\Workbench\Package $package * @return string */ protected function runCreator($package) { $path = $this->laravel['path.base'] . '/' . Config::get('elepunk/orhchestrate::extension_directory'); return $this->creator->create($package, $path, false); }