'success', 'data' => $callback(), 'message' => null ]; } catch(\Exception $e) { $message = [ 'status' => 'error', 'data' => null, 'message' => $e->getMessage() ]; } return new JSONResponse($message); } }