PHP Class Laracademy\Generators\Commands\ModelFromTableCommand

Inheritance: extends Illuminate\Console\Command
Datei anzeigen Open project: laracademy/generators

Public Properties

Property Type Description
$columns
$databaseConnection
$debug
$fieldsCast
$fieldsDate
$fieldsFillable
$fieldsHidden
$options

Protected Properties

Property Type Description
$description string The console command description.
$signature string The name and signature of the console command.

Public Methods

Method Description
__construct ( ) : void Create a new command instance.
describeTable ( $tableName )
doComment ( $text, $overrideDebug = false ) will add a comment to the screen if debug is on, or is over-ridden.
getAllTables ( ) will return an array of all table names.
getOptions ( ) returns all the options that the user specified.
getSchema ( $tableName )
getStub ( ) returns the stub to use to generate the class.
handle ( ) : mixed Execute the console command.
replaceClassName ( string $stub, string $tableName ) : string replaces the class name in the stub.
replaceConnection ( $stub, $database )
replaceModuleInformation ( string $stub, array $modelInformation ) : string replaces the module information.

Method Details

__construct() public method

Create a new command instance.
public __construct ( ) : void
return void

describeTable() public method

public describeTable ( $tableName )

doComment() public method

will add a comment to the screen if debug is on, or is over-ridden.
public doComment ( $text, $overrideDebug = false )

getAllTables() public method

will return an array of all table names.
public getAllTables ( )

getOptions() public method

returns all the options that the user specified.
public getOptions ( )

getSchema() public method

public getSchema ( $tableName )

getStub() public method

returns the stub to use to generate the class.
public getStub ( )

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed

replaceClassName() public method

replaces the class name in the stub.
public replaceClassName ( string $stub, string $tableName ) : string
$stub string stub content
$tableName string the name of the table to make as the class
return string stub content

replaceConnection() public method

public replaceConnection ( $stub, $database )

replaceModuleInformation() public method

replaces the module information.
public replaceModuleInformation ( string $stub, array $modelInformation ) : string
$stub string stub content
$modelInformation array array (key => value)
return string stub content

Property Details

$columns public_oe property

public $columns

$databaseConnection public_oe property

public $databaseConnection

$debug public_oe property

public $debug

$description protected_oe property

The console command description.
protected string $description
return string

$fieldsCast public_oe property

public $fieldsCast

$fieldsDate public_oe property

public $fieldsDate

$fieldsFillable public_oe property

public $fieldsFillable

$fieldsHidden public_oe property

public $fieldsHidden

$options public_oe property

public $options

$signature protected_oe property

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