Add branding feature with form, route, and object implementations
Introduced a new branding functionality, including a `branding_o` object, `create_branding_f` form, and associated routes in `BrandingRoute`. Refactored the forms directory for better organization and added support for branding in departments. Extended validation, object handling, and response handling to accommodate this new feature.
This commit is contained in:
@@ -31,7 +31,13 @@ class response implements response_i
|
||||
}
|
||||
// If the data isn't an array, convert it to an array
|
||||
if (!is_array($data) && !is_object($data)) {
|
||||
$data = ['message' => $data];
|
||||
// Check if the variable is a valid JSON string
|
||||
if (is_string($data) && json_decode($data) !== null) {
|
||||
$data = json_decode($data, true);
|
||||
} else {
|
||||
// If the variable is not a valid JSON string, convert it to an array
|
||||
$data = ['message' => $data];
|
||||
}
|
||||
}
|
||||
// If the debug mode is enabled, add the debug data to the response
|
||||
if ($DEBUG) {
|
||||
|
||||
Reference in New Issue
Block a user