MigrationCreator
class MigrationCreator (View source)
Properties
protected Filesystem | $files | The filesystem instance. | |
protected array | $postCreate | The registered post create hooks. |
Methods
Create a new migration at the given path.
Ensure that a migration with the given name doesn't already exist.
Get the migration stub file.
Populate the place-holders in the migration stub.
Get the class name of a migration name.
Get the full path to the migration.
Fire the registered post create hooks.
Get the date prefix for the migration.
Get the path to the stubs.
Get the filesystem instance.
Details
at line 32
void
__construct(Filesystem $files)
Create a new migration creator instance.
at line 47
string
create(string $name, string $path, string $table = null, bool $create = false)
Create a new migration at the given path.
at line 77
protected void
ensureMigrationDoesntAlreadyExist(string $name)
Ensure that a migration with the given name doesn't already exist.
at line 91
protected string
getStub(string $table, bool $create)
Get the migration stub file.
at line 113
protected string
populateStub(string $name, string $stub, string $table)
Populate the place-holders in the migration stub.
at line 133
protected string
getClassName(string $name)
Get the class name of a migration name.
at line 145
protected string
getPath(string $name, string $path)
Get the full path to the migration.
at line 156
protected void
firePostCreateHooks(string $table)
Fire the registered post create hooks.
at line 179
protected string
getDatePrefix()
Get the date prefix for the migration.
at line 189
string
stubPath()
Get the path to the stubs.
at line 199
Filesystem
getFilesystem()
Get the filesystem instance.