PHP Class Caffeinated\Modules\Console\Commands\ModuleMigrateResetCommand

Inheritance: extends Illuminate\Console\Command, use trait Illuminate\Console\ConfirmableTrait
Datei anzeigen Open project: caffeinated/modules

Protected Properties

Property Type Description
$description string The console command description.
$files Illuminate\Filesystem\Filesystem
$migrator Illuminate\Database\Migrations\Migrator
$module Caffeinated\Modules\Modules
$name string The console command name.

Public Methods

Method Description
__construct ( Modules $module, Illuminate\Filesystem\Filesystem $files, Illuminate\Database\Migrations\Migrator $migrator ) Create a new command instance.
fire ( ) : mixed Execute the console command.

Protected Methods

Method Description
getArguments ( ) : array Get the console command arguments.
getMigrationPath ( $slug ) : string Get migrations path.
getOptions ( ) : array Get the console command options.
getParameters ( string $slug ) : array Get the console command parameters.
reset ( string $slug ) : mixed Run the migration reset for the specified module.
runDown ( string $slug, object $migration, boolean $pretend ) Run "down" a migration instance.

Method Details

__construct() public method

Create a new command instance.
public __construct ( Modules $module, Illuminate\Filesystem\Filesystem $files, Illuminate\Database\Migrations\Migrator $migrator )
$module Caffeinated\Modules\Modules
$files Illuminate\Filesystem\Filesystem
$migrator Illuminate\Database\Migrations\Migrator

fire() public method

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

getArguments() protected method

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

getMigrationPath() protected method

Get migrations path.
protected getMigrationPath ( $slug ) : string
return string

getOptions() protected method

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

getParameters() protected method

Get the console command parameters.
protected getParameters ( string $slug ) : array
$slug string
return array

reset() protected method

Migrations should be reset in the reverse order that they were migrated up as. This ensures the database is properly reversed without conflict.
protected reset ( string $slug ) : mixed
$slug string
return mixed

runDown() protected method

Run "down" a migration instance.
protected runDown ( string $slug, object $migration, boolean $pretend )
$slug string
$migration object
$pretend boolean

Property Details

$description protected_oe property

The console command description.
protected string $description
return string

$files protected_oe property

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

$migrator protected_oe property

protected Migrator,Illuminate\Database\Migrations $migrator
return Illuminate\Database\Migrations\Migrator

$module protected_oe property

protected Modules,Caffeinated\Modules $module
return Caffeinated\Modules\Modules

$name protected_oe property

The console command name.
protected string $name
return string