class VersionAliasResolver (View source)

Constants

ALIAS_FIRST

ALIAS_CURRENT

ALIAS_PREV

ALIAS_NEXT

ALIAS_LATEST

Methods

__construct(MigrationRepository $migrationRepository)

No description

resolveVersionAlias(string $alias)

Returns the version number from an alias.

Details

__construct(MigrationRepository $migrationRepository)

Parameters

MigrationRepository $migrationRepository

resolveVersionAlias(string $alias)

Returns the version number from an alias.

Supported aliases are:

  • first: The very first version before any migrations have been run.
  • current: The current version.
  • prev: The version prior to the current version.
  • next: The version following the current version.
  • latest: The latest available version.

If an existing version number is specified, it is returned verbatimly.

Parameters

string $alias