Testing callback on server
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user