MigrationPublisher

class MigrationPublisher (View source)

Properties

protected array $existing A cache of migrations at a given destination.

Methods

void __construct(Filesystem $files)

Create a new migration publisher instance.

array publish(string $source, string $destination)

Publish the given package's migrations.

array getFreshMigrations(string $source, string $destination)

Get the fresh migrations for the source.

bool migrationExists(string $migration, string $destination)

Determine if the migration is already published.

array getExistingMigrationNames(string $destination)

Get the existing migration names from the destination.

array getPackageMigrations(string $source)

Get the file list from the source directory.

string getNewMigrationName(string $file, int $add)

Get the new migration name.

Details

void __construct(Filesystem $files)

Create a new migration publisher instance.

Parameters

Filesystem $files

Return Value

void

array publish(string $source, string $destination)

Publish the given package's migrations.

Parameters

string $source
string $destination

Return Value

array

protected array getFreshMigrations(string $source, string $destination)

Get the fresh migrations for the source.

Parameters

string $source
string $destination

Return Value

array

bool migrationExists(string $migration, string $destination)

Determine if the migration is already published.

Parameters

string $migration
string $destination

Return Value

bool

array getExistingMigrationNames(string $destination)

Get the existing migration names from the destination.

Parameters

string $destination

Return Value

array

protected array getPackageMigrations(string $source)

Get the file list from the source directory.

Parameters

string $source

Return Value

array

protected string getNewMigrationName(string $file, int $add)

Get the new migration name.

Parameters

string $file
int $add

Return Value

string

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/MigrationPublisher.html