PHP Class Mpociot\LaravelTestFactoryHelper\Console\GenerateCommand

Inheritance: extends Illuminate\Console\Command
Datei anzeigen Open project: mpociot/laravel-test-factory-helper

Protected Properties

Property Type Description
$description string The console command description.
$dir string
$dirs array
$existingFactories string
$filename string
$files Illuminate\Filesystem\Filesystem
$name string The console command name.
$properties array
$reset
$view Illuminate\Contracts\View\Factory

Public Methods

Method Description
__construct ( Illuminate\Filesystem\Filesystem $files, $view )
fire ( ) : void Execute the console command.

Protected Methods

Method Description
createFactory ( string $class ) : string
generateFactories ( $loadModels, $ignore = '' )
getArguments ( ) : array Get the console command arguments.
getOptions ( ) : array Get the console command options.
getPropertiesFromMethods ( Model $model )
getPropertiesFromTable ( Model $model ) Load the properties from the database table.
loadModels ( )
setProperty ( string $name, string | null $type = null )

Method Details

__construct() public method

public __construct ( Illuminate\Filesystem\Filesystem $files, $view )
$files Illuminate\Filesystem\Filesystem

createFactory() protected method

protected createFactory ( string $class ) : string
$class string
return string

fire() public method

Execute the console command.
public fire ( ) : void
return void

generateFactories() protected method

protected generateFactories ( $loadModels, $ignore = '' )

getArguments() protected method

Get the console command arguments.
protected getArguments ( ) : array
return array

getOptions() protected method

Get the console command options.
protected getOptions ( ) : array
return array

getPropertiesFromMethods() protected method

protected getPropertiesFromMethods ( Model $model )
$model Illuminate\Database\Eloquent\Model

getPropertiesFromTable() protected method

Load the properties from the database table.
protected getPropertiesFromTable ( Model $model )
$model Illuminate\Database\Eloquent\Model

loadModels() protected method

protected loadModels ( )

setProperty() protected method

protected setProperty ( string $name, string | null $type = null )
$name string
$type string | null

Property Details

$description protected_oe property

The console command description.
protected string $description
return string

$dir protected_oe property

protected string $dir
return string

$dirs protected_oe property

protected array $dirs
return array

$existingFactories protected_oe property

protected string $existingFactories
return string

$filename protected_oe property

protected string $filename
return string

$files protected_oe property

protected Filesystem,Illuminate\Filesystem $files
return Illuminate\Filesystem\Filesystem

$name protected_oe property

The console command name.
protected string $name
return string

$properties protected_oe property

protected array $properties
return array

$reset protected_oe property

protected $reset

$view protected_oe property

protected Factory,Illuminate\Contracts\View $view
return Illuminate\Contracts\View\Factory