faker = Factory::create(); parent::__construct(); } /** * Execute the console command. * * @return mixed */ public function handle() { $path = base_path('openapi'); $directory = new DirectoryIterator($path); $this->info($directory); foreach ($directory as $file) { $this->info($file); Storage::disk('base')->delete('/openapi/api-docs.yaml'); Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/info.yaml')); Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/paths/paths.yaml')); Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/components.yaml')); Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/misc/misc.yaml')); } } }