PHP 클래스 DrawMyAttention\ResourceGenerator\Commands\ResourceMakeCommand

상속: extends Illuminate\Console\Command
파일 보기 프로젝트 열기: drawmyattention/laravel-make-resource

보호된 프로퍼티들

프로퍼티 타입 설명
$description string The console command description.
$signature string The name and signature of the console command.

공개 메소드들

메소드 설명
__construct ( Illuminate\Filesystem\Filesystem $files, Illuminate\Support\Composer $composer ) Create a new command instance.
addModelAttributes ( $name, $attributes, $stub )
buildFakerAttributes ( $attributes )
buildMigrationFilename ( $model )
buildTableColumns ( $attributes )
convertArrayToString ( $array ) : string Convert a PHP array into a string version.
convertModelToTableName ( $model )
handle ( ) : mixed Execute the console command.
parseAttributesFromInputString ( string $text ) : array Convert a pipe-separated list of attributes to an array.

보호된 메소드들

메소드 설명
buildMigration ( $name )
buildModel ( $name )

비공개 메소드들

메소드 설명
addMigrationAttributes ( $text, $stub )
appendRoutes ( $modelName )
buildSchemaColumn ( string $fieldType, string $name, integer $length, array $traits = [] ) : string Create a Schema Builder column.
createController ( $modelName )
createMigration ( $name )
createModel ( string $name ) : boolean Create and store a new Model to the filesystem.
createModelFactory ( $name )
extractAttributePropertiesToApply ( $properties ) : array Get the column properties that should be applied to the column.
extractFieldLengthValue ( array $properties ) : integer Extract a numeric length value from all properties specified for the attribute.
getFieldTypeFromProperties ( array $properties ) : string Get the column field type based from the properties of the field being created.
modelName ( string $name ) : string Build a Model name from a word.
replaceClassName ( $name, $stub )
typeCanDefineSize ( string $type ) : boolean Can the data type have it's size controlled within the migration?

메소드 상세

__construct() 공개 메소드

Create a new command instance.
public __construct ( Illuminate\Filesystem\Filesystem $files, Illuminate\Support\Composer $composer )
$files Illuminate\Filesystem\Filesystem
$composer Illuminate\Support\Composer

addModelAttributes() 공개 메소드

public addModelAttributes ( $name, $attributes, $stub )

buildFakerAttributes() 공개 메소드

public buildFakerAttributes ( $attributes )

buildMigration() 보호된 메소드

protected buildMigration ( $name )

buildMigrationFilename() 공개 메소드

public buildMigrationFilename ( $model )

buildModel() 보호된 메소드

protected buildModel ( $name )

buildTableColumns() 공개 메소드

public buildTableColumns ( $attributes )

convertArrayToString() 공개 메소드

Convert a PHP array into a string version.
public convertArrayToString ( $array ) : string
$array
리턴 string

convertModelToTableName() 공개 메소드

public convertModelToTableName ( $model )

handle() 공개 메소드

Execute the console command.
public handle ( ) : mixed
리턴 mixed

parseAttributesFromInputString() 공개 메소드

Convert a pipe-separated list of attributes to an array.
public parseAttributesFromInputString ( string $text ) : array
$text string The Pipe separated attributes
리턴 array

프로퍼티 상세

$description 보호되어 있는 프로퍼티

The console command description.
protected string $description
리턴 string

$signature 보호되어 있는 프로퍼티

The name and signature of the console command.
protected string $signature
리턴 string