����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 3.16.89.150 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/bofirm.gltechlimited.com/app/Traits/ |
Upload File : |
<?php namespace App\Traits; trait ApiStatusTrait { public $successStatus = 200; public $failureStatus = 500; public $validationFailureStatus = 422; public function success($data = [], $msg = NULL) { $response['success'] = true; $response['message'] = $msg ?? __("Successfully done"); $response['data'] = $data; return response()->json($response, $this->successStatus); } public function failed($data = [], $msg = NULL) { $response['success'] = false; $response['message'] = $msg ?? __("Something went wrong"); $response['data'] = $data; return response()->json($response, $this->failureStatus); } public function error($data = [], $msg = NULL, $code = NULL) { $response['success'] = false; $response['message'] = $msg ?? __("Something went wrong"); $response['data'] = $data; return response()->json($response, $code ?? $this->failureStatus); } public function validationError($data = [], $msg = NULL) { $response['success'] = false; $response['message'] = $msg ?? __("Validation error"); $response['data'] = $data; return response()->json($response, $this->validationFailureStatus); } }