/** * Publish the assets for a given package name. * * @param string $package * @return void */ protected function publishAssets($package) { if (!is_null($path = $this->getPath())) { $this->assets->publish($package, $path); } else { $this->assets->publishPackage($package); } $this->output->writeln('<info>Assets published for package:</info> ' . $package); }
/** * Register the asset publisher service and command. * * @return void */ protected function registerAssetPublisher() { $this->registerAssetPublishCommand(); $this->app->singleton('asset.publisher', function ($app) { $publicPath = $app['path.public']; // The asset "publisher" is responsible for moving package's assets into the // web accessible public directory of an application so they can actually // be served to the browser. Otherwise, they would be locked in vendor. $publisher = new AssetPublisher($app['files'], $publicPath); $publisher->setPackagePath($app['path.base'] . '/vendor'); return $publisher; }); }