!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/Contact/   drwxrwxrwx
Free 13.19 GB of 57.97 GB (22.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Webkul\Admin\Http\Controllers\Contact;

use 
Illuminate\Http\JsonResponse;
use 
Illuminate\Http\RedirectResponse;
use 
Illuminate\Support\Facades\Event;
use 
Illuminate\View\View;
use 
Webkul\Admin\DataGrids\Contact\OrganizationDataGrid;
use 
Webkul\Admin\Http\Controllers\Controller;
use 
Webkul\Admin\Http\Requests\AttributeForm;
use 
Webkul\Admin\Http\Requests\MassDestroyRequest;
use 
Webkul\Contact\Repositories\OrganizationRepository;

class 
OrganizationController extends Controller
{
    
/**
     * Create a new controller instance.
     *
     * @return void
     */
    
public function __construct(protected OrganizationRepository $organizationRepository)
    {
        
request()->request->add(['entity_type' => 'organizations']);
    }

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

        return 
view('admin::contacts.organizations.index');
    }

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

    
/**
     * Store a newly created resource in storage.
     */
    
public function store(AttributeForm $request): RedirectResponse
    
{
        
Event::dispatch('contacts.organization.create.before');

        
$organization $this->organizationRepository->create(request()->all());

        
Event::dispatch('contacts.organization.create.after'$organization);

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

        return 
redirect()->route('admin.contacts.organizations.index');
    }

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

        return 
view('admin::contacts.organizations.edit'compact('organization'));
    }

    
/**
     * Update the specified resource in storage.
     */
    
public function update(AttributeForm $requestint $id): RedirectResponse
    
{
        
Event::dispatch('contacts.organization.update.before'$id);

        
$organization $this->organizationRepository->update(request()->all(), $id);

        
Event::dispatch('contacts.organization.update.after'$organization);

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

        return 
redirect()->route('admin.contacts.organizations.index');
    }

    
/**
     * Remove the specified resource from storage.
     */
    
public function destroy(int $id): JsonResponse
    
{
        try {
            
Event::dispatch('contact.organization.delete.before'$id);

            
$this->organizationRepository->delete($id);

            
Event::dispatch('contact.organization.delete.after'$id);

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

    
/**
     * Mass Delete the specified resources.
     */
    
public function massDestroy(MassDestroyRequest $massDestroyRequest): JsonResponse
    
{
        
$organizations $this->organizationRepository->findWhereIn('id'$massDestroyRequest->input('indices'));

        foreach (
$organizations as $organization) {
            
Event::dispatch('contact.organization.delete.before'$organization);

            
$this->organizationRepository->delete($organization->id);

            
Event::dispatch('contact.organization.delete.after'$organization);
        }

        return 
response()->json([
            
'message' => trans('admin::app.contacts.organizations.index.delete-success'),
        ]);
    }
}

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