update emergency contact student controller

This commit is contained in:
root
2026-03-25 17:59:40 -04:00
parent 33be0c9a0d
commit c582bfc242
11 changed files with 179 additions and 16 deletions
@@ -58,4 +58,17 @@ class ConfigurationAdminController extends BaseApiController
return response()->json(['ok' => true]);
}
public function getByKey(string $configKey): JsonResponse
{
$config = $this->service->getByKey($configKey);
if (!$config) {
return response()->json(['ok' => false, 'message' => 'Configuration not found.'], 404);
}
return response()->json([
'ok' => true,
'config' => new ConfigurationResource($config->toArray()),
]);
}
}