Esempio n. 1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $package = $this->input->getArgument('package');
     if (!is_null($path = $this->getPath())) {
         $this->view->publish($package, $path);
     } else {
         $this->view->publishPackage($package);
     }
     $this->output->writeln('<info>Views published for package:</info> ' . $package);
 }
 /**
  * Register the view publisher class and command.
  *
  * @return void
  */
 protected function registerViewPublisher()
 {
     $this->registerViewPublishCommand();
     $this->app->singleton('view.publisher', function ($app) {
         $viewPath = $app['path.base'] . '/resources/views';
         // Once we have created the view publisher, we will set the default packages
         // path on this object so that it knows where to find all of the packages
         // that are installed for the application and can move them to the app.
         $publisher = new ViewPublisher($app['files'], $viewPath);
         $publisher->setPackagePath($app['path.base'] . '/vendor');
         return $publisher;
     });
 }