PHP Class Laratrust\MigrationCommand

Inheritance: extends Illuminate\Console\Command
Datei anzeigen Open project: santigarcor/laratrust

Protected Properties

Property Type Description
$description string The console command description.
$migrationSuffix string Suffix of the migration name.
$name string The console command name.

Public Methods

Method Description
fire ( ) : void Execute the console command.

Protected Methods

Method Description
alreadyExistingMigrations ( ) : array Check if there is another migration with the same suffix.
createMigration ( ) : boolean Create the migration.
generateMigrationMessage ( string $rolesTable, string $roleUserTable, string $permissionsTable, string $permissionRoleTable, $permissionUserTable ) : string Generate the message to display when running the console command showing what tables are going to be created.
getExistingMigrationsWarning ( array $existingMigrations ) : string Build a warning regarding possible duplication due to already existing migrations
getMigrationPath ( string | null $date = null ) : string Get the migration path.

Method Details

alreadyExistingMigrations() protected method

Check if there is another migration with the same suffix.
protected alreadyExistingMigrations ( ) : array
return array

createMigration() protected method

Create the migration.
protected createMigration ( ) : boolean
return boolean

fire() public method

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

generateMigrationMessage() protected method

Generate the message to display when running the console command showing what tables are going to be created.
protected generateMigrationMessage ( string $rolesTable, string $roleUserTable, string $permissionsTable, string $permissionRoleTable, $permissionUserTable ) : string
$rolesTable string
$roleUserTable string
$permissionsTable string
$permissionRoleTable string
return string

getExistingMigrationsWarning() protected method

Build a warning regarding possible duplication due to already existing migrations
protected getExistingMigrationsWarning ( array $existingMigrations ) : string
$existingMigrations array
return string

getMigrationPath() protected method

The date parameter is optional for ability to provide a custom value or a wildcard.
protected getMigrationPath ( string | null $date = null ) : string
$date string | null
return string

Property Details

$description protected_oe property

The console command description.
protected string $description
return string

$migrationSuffix protected_oe property

Suffix of the migration name.
protected string $migrationSuffix
return string

$name protected_oe property

The console command name.
protected string $name
return string