getExtension() !== "json") { continue; } $schemaJson = file_get_contents($configDir . "/Schemas/" . $file->getFilename()); $schema = json_decode($schemaJson, true); if (empty($schema)) { $this->error("Invalid JSON " . $file->getFilename()); return 0; } $schemas[] = $schema; } $config["schemas"] = collect($schemas)->sortBy("label")->values()->toArray(); $configOuputJson = json_encode($config); file_put_contents(storage_path("lucent.config.json"), $configOuputJson); $this->info("Lucent JSON update"); } }