!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/notification/vendor/illuminate/database/Console/Factories/   drwxr-xr-x
Free 13.25 GB of 57.97 GB (22.85%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Illuminate\Database\Console\Factories;

use 
Illuminate\Console\GeneratorCommand;
use 
Illuminate\Support\Str;
use 
Symfony\Component\Console\Attribute\AsCommand;
use 
Symfony\Component\Console\Input\InputOption;

#[
AsCommand(name'make:factory')]
class 
FactoryMakeCommand extends GeneratorCommand
{
    
/**
     * The console command name.
     *
     * @var string
     */
    
protected $name 'make:factory';

    
/**
     * The name of the console command.
     *
     * This name is used to identify the command during lazy loading.
     *
     * @var string|null
     *
     * @deprecated
     */
    
protected static $defaultName 'make:factory';

    
/**
     * The console command description.
     *
     * @var string
     */
    
protected $description 'Create a new model factory';

    
/**
     * The type of class being generated.
     *
     * @var string
     */
    
protected $type 'Factory';

    
/**
     * Get the stub file for the generator.
     *
     * @return string
     */
    
protected function getStub()
    {
        return 
$this->resolveStubPath('/stubs/factory.stub');
    }

    
/**
     * Resolve the fully-qualified path to the stub.
     *
     * @param  string  $stub
     * @return string
     */
    
protected function resolveStubPath($stub)
    {
        return 
file_exists($customPath $this->laravel->basePath(trim($stub'/')))
            ? 
$customPath
            
__DIR__.$stub;
    }

    
/**
     * Build the class with the given name.
     *
     * @param  string  $name
     * @return string
     */
    
protected function buildClass($name)
    {
        
$factory class_basename(Str::ucfirst(str_replace('Factory'''$name)));

        
$namespaceModel $this->option('model')
                        ? 
$this->qualifyModel($this->option('model'))
                        : 
$this->qualifyModel($this->guessModelName($name));

        
$model class_basename($namespaceModel);

        
$namespace $this->getNamespace(
            
Str::replaceFirst($this->rootNamespace(), 'Database\\Factories\\'$this->qualifyClass($this->getNameInput()))
        );

        
$replace = [
            
'{{ factoryNamespace }}' => $namespace,
            
'NamespacedDummyModel' => $namespaceModel,
            
'{{ namespacedModel }}' => $namespaceModel,
            
'{{namespacedModel}}' => $namespaceModel,
            
'DummyModel' => $model,
            
'{{ model }}' => $model,
            
'{{model}}' => $model,
            
'{{ factory }}' => $factory,
            
'{{factory}}' => $factory,
        ];

        return 
str_replace(
            
array_keys($replace), array_values($replace), parent::buildClass($name)
        );
    }

    
/**
     * Get the destination class path.
     *
     * @param  string  $name
     * @return string
     */
    
protected function getPath($name)
    {
        
$name = (string) Str::of($name)->replaceFirst($this->rootNamespace(), '')->finish('Factory');

        return 
$this->laravel->databasePath().'/factories/'.str_replace('\\''/'$name).'.php';
    }

    
/**
     * Guess the model name from the Factory name or return a default model name.
     *
     * @param  string  $name
     * @return string
     */
    
protected function guessModelName($name)
    {
        if (
str_ends_with($name'Factory')) {
            
$name substr($name0, -7);
        }

        
$modelName $this->qualifyModel(Str::after($name$this->rootNamespace()));

        if (
class_exists($modelName)) {
            return 
$modelName;
        }

        if (
is_dir(app_path('Models/'))) {
            return 
$this->rootNamespace().'Models\Model';
        }

        return 
$this->rootNamespace().'Model';
    }

    
/**
     * Get the console command options.
     *
     * @return array
     */
    
protected function getOptions()
    {
        return [
            [
'model''m'InputOption::VALUE_OPTIONAL'The name of the model'],
        ];
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.006 ]--