class MigrationCreator

Properties

protected Filesystem $files <p>The filesystem instance.</p>
protected string $publicPath

Methods

__construct(Filesystem $files, string $publicPath)

<p>Create a new migrator instance.</p>

string
create(string $name, $extension = null, string $table = null, bool $create = false)

<p>Create a new migration for the given extension.</p>

string
getStub(string $table, bool $create)

<p>Get the migration stub file.</p>

string
populateStub($extension, string $name, string $stub, string $table)

<p>Populate the place-holders in the migration stub.</p>

string
getMigrationPath(string $extension)

<p>Get the full path name to the migration directory.</p>

string
getPath(string $name, string $path)

<p>Get the full path name to the migration.</p>

string
getDatePrefix()

<p>Get the date prefix for the migration.</p>

string
getStubPath()

<p>Get the path to the stubs.</p>

Details

__construct(Filesystem $files, string $publicPath)

<p>Create a new migrator instance.</p>

Parameters

Filesystem $files
string $publicPath

string create(string $name, $extension = null, string $table = null, bool $create = false)

<p>Create a new migration for the given extension.</p>

Parameters

string $name
$extension
string $table
bool $create

Return Value

string

protected string getStub(string $table, bool $create)

<p>Get the migration stub file.</p>

Parameters

string $table
bool $create

Return Value

string

protected string populateStub($extension, string $name, string $stub, string $table)

<p>Populate the place-holders in the migration stub.</p>

Parameters

$extension
string $name
string $stub
string $table

Return Value

string

protected string getMigrationPath(string $extension)

<p>Get the full path name to the migration directory.</p>

Parameters

string $extension

Return Value

string

protected string getPath(string $name, string $path)

<p>Get the full path name to the migration.</p>

Parameters

string $name
string $path

Return Value

string

protected string getDatePrefix()

<p>Get the date prefix for the migration.</p>

Return Value

string

protected string getStubPath()

<p>Get the path to the stubs.</p>

Return Value

string