$code, 'message'=>$msg, 'data'=>$data, ]; return json($result,$httpStatus); } function showSuccess($data = [],$httpStatus=200) { $result=[ 'code' => config('status.success')[0], 'message' => config('status.success')[1], 'data' => $data, ]; return json($result, $httpStatus); } function showError($status, $httpStatus = 400) { $result=[ 'code' => $status[0], 'message' => $status[1], 'data' => [], ]; return json($result, $httpStatus); }