class MigrationCreator (View source)
protected Filesystem | $files | The filesystem instance. | |
protected string | $customStubPath | The custom app stubs directory. | |
protected array | $postCreate | The registered post create hooks. |
void | __construct(Filesystem $files, string $customStubPath) Create a new migration creator instance. | |
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 $name, 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) Fire the registered post create hooks. | |
void | afterCreate(Closure $callback) Register a post migration create hook. | |
string | getDatePrefix() Get the date prefix for the migration. | |
string | stubPath() Get the path to the stubs. | |
Filesystem | getFilesystem() Get the filesystem instance. |
Create a new migration creator instance.
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.
Register a post migration create hook.
Get the date prefix for the migration.
Get the path to the stubs.
Get the filesystem instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Database/Migrations/MigrationCreator.html