/** * Execute the console command. * * @return mixed */ public function handle() { $path = app_path('Widgets') . DIRECTORY_SEPARATOR . $this->argument('name') . '.json'; if ($this->option('path')) { $path = base_path($this->argument('name')); } $this->extensions->registerManifest($path); $this->laravel->make('cache.store')->forget('extensions.widgets'); $this->laravel->make('cache.store')->forget('extensions.all'); $this->info($this->argument('name') . ' widget extension installed!'); }
/** * Register an extension using manifest config file. * * @param string $path * @throws \Exception * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function registerManifest($path) { $this->repository->registerManifest($path); }