update emergency contact student controller
This commit is contained in:
@@ -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()),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user