!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/krayin/krayin-package-generator/src/Console/Command/   drwxrwxrwx
Free 12.95 GB of 57.97 GB (22.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Webkul\PackageGenerator\Console\Command;

use 
Symfony\Component\Console\Attribute\AsCommand;

#[
AsCommand(name'package:make-model')]
class 
ModelMakeCommand extends MakeCommand
{
    
/**
     * The name and signature of the console command.
     *
     * @var string
     */
    
protected $signature 'package:make-model {name} {package} {--force}';

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

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

    
/**
     * Execute the console command.
     */
    
public function handle()
    {
        
parent::handle();

        
$this->call('package:make-model-proxy', [
            
'name'    => $this->argument('name').'Proxy',
            
'package' => $this->argument('package'),
            
'--force' => $this->option('force'),
        ]);

        
$this->call('package:make-model-contract', [
            
'name'    => $this->argument('name'),
            
'package' => $this->argument('package'),
            
'--force' => $this->option('force'),
        ]);
    }

    
/**
     * Get the stub file for the generator.
     */
    
protected function getStubContents(): string
    
{
        return 
$this->packageGenerator->getStubContents('model'$this->getStubVariables());
    }

    
/**
     * Get the stub variables.
     */
    
protected function getStubVariables(): array
    {
        return [
            
'PACKAGE'   => $this->getClassNamespace($this->argument('package')),
            
'NAMESPACE' => $this->getClassNamespace($this->argument('package').'/Models'),
            
'CLASS'     => $this->getClassName(),
        ];
    }

    
/**
     * Get the source file path.
     */
    
protected function getSourceFilePath(): string
    
{
        
$path base_path('packages/'.$this->argument('package')).'/src/Models';

        return 
"$path/{$this->getClassName()}.php";
    }
}

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