MigrationCreator
class MigrationCreator (View source)
Properties
protected Filesystem | $files | The filesystem instance. |
|
protected string | $customStubPath | The custom app stubs directory. |
|
protected array | $postCreate | The registered post create hooks. |
Methods
string
create(string $name, string $path, string|null $table = null, bool $create = false)
Create a new migration at the given path.
void
ensureMigrationDoesntAlreadyExist(string $name, string $migrationPath = null)
Ensure that a migration with the given name doesn't already exist.
string
getStub(string|null $table, bool $create)
Get the migration stub file.
string
populateStub(string $stub, string|null $table)
Populate the place-holders in the migration stub.
string
getClassName(string $name)
Get the class name of a migration name.
string
getPath(string $name, string $path)
Get the full path to the migration.
void
firePostCreateHooks(string|null $table, string $path)
Fire the registered post create hooks.
void
string
getDatePrefix()
Get the date prefix for the migration.
string
stubPath()
Get the path to the stubs.
getFilesystem()
Get the filesystem instance.
Details
string
create(string $name, string $path, string|null $table = null, bool $create = false)
Create a new migration at the given path.
protected void
ensureMigrationDoesntAlreadyExist(string $name, string $migrationPath = null)
Ensure that a migration with the given name doesn't already exist.
protected string
populateStub(string $stub, string|null $table)
Populate the place-holders in the migration stub.