Testing callback on server

This commit is contained in:
ivan-sim
2024-04-18 11:24:16 +07:00
parent 3cfca98846
commit b55fcaf235
3 changed files with 280 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ class Helper
} else {
return 'User not found.';
}
}
public static function serviceName($code)
@@ -269,11 +269,14 @@ class Helper
*
* @param array|object $data
* @param int $statusCode
* @param string $message
* @param string|array|object $message
* @return JsonResponse
*/
public static function responseJson(array|object $data = [], string $status = 'success', int $statusCode = Response::HTTP_OK, string $message = 'Data berhasil di ambil'): JsonResponse
public static function responseJson(array|object $data = [], string $status = 'success', int $statusCode = Response::HTTP_OK, string|array|object $message = 'Data berhasil di ambil'): JsonResponse
{
if ($message instanceof \Illuminate\Support\MessageBag) {
$message = $message->first();
}
return response()->json([
'status' => $status,
'statusCode' => $statusCode,
@@ -450,7 +453,7 @@ class Helper
}
} else {
// throw new ImportRowException(__('Format Date Invalid'), 0, null, $date_from_row);
return null;
return null;
}
}