scaffold( id: $this->argument('id'), name: $this->option('name'), description: $this->option('description'), author: $this->option('author'), ui: ! $this->option('no-ui'), outDir: $this->option('out'), force: (bool) $this->option('force'), prefix: $this->option('prefix'), ); } catch (InvalidExtensionException $invalidExtensionException) { $this->components->error($invalidExtensionException->getMessage()); return self::FAILURE; } $this->components->info("Extension scaffolded at {$target}."); foreach ($scaffolder->files() as $file) { $this->components->twoColumnDetail($file, 'created'); } $this->line(''); $this->components->info('Next steps:'); $this->components->bulletList(array_filter([ $this->option('no-ui') ? null : "cd {$target} && npm install && npm run build", "php artisan p:extension:install {$target} --enable", ])); return self::SUCCESS; } /** @return array> */ protected function promptForMissingArgumentsUsing(): array { return [ 'id' => ['What should the extension be identified as?', 'E.g. my-extension'], ]; } }