PHP Class Nwidart\Modules\Migrations\Migrator

Afficher le fichier Open project: nwidart/laravel-modules Class Usage Examples

Protected Properties

Свойство Type Description
$database string The database connection to be used
$laravel Illuminate\Foundation\Application. Laravel Application instance.
$module Nwidart\Modules\Module Pingpong Module instance.

Méthodes publiques

Méthode Description
__construct ( Module $module ) Create new instance.
down ( string $migration ) Run down schema from the given migration name.
find ( string $migration ) : object Find migration data from database by given migration name.
getLast ( array $migrations ) : Collection Get the last migration batch.
getLastBatchNumber ( array $migrations ) : integer Get the last migration batch number.
getMigrations ( boolean $reverse = false ) : array Get migration files.
getModule ( ) : Module
getNextBatchNumber ( ) : integer Get the next migration batch number.
getPath ( ) : string Get migration path.
getRan ( ) : Collection Get the ran migrations.
log ( string $migration ) : mixed Save new migration to database.
requireFiles ( array $files ) Require in all the migration files in a given path.
reset ( ) : array Reset migration.
resolve ( string $file ) : object Resolve a migration instance from a file.
rollback ( ) : array Rollback migration.
setDatabase ( $database ) Set the database connection to be used
table ( ) : string Get table instance.
up ( string $migration ) Run up schema from the given migration name.

Method Details

__construct() public méthode

Create new instance.
public __construct ( Module $module )
$module Nwidart\Modules\Module

down() public méthode

Run down schema from the given migration name.
public down ( string $migration )
$migration string

find() public méthode

Find migration data from database by given migration name.
public find ( string $migration ) : object
$migration string
Résultat object

getLast() public méthode

Get the last migration batch.
public getLast ( array $migrations ) : Collection
$migrations array
Résultat Illuminate\Support\Collection

getLastBatchNumber() public méthode

Get the last migration batch number.
public getLastBatchNumber ( array $migrations ) : integer
$migrations array
Résultat integer

getMigrations() public méthode

Get migration files.
public getMigrations ( boolean $reverse = false ) : array
$reverse boolean
Résultat array

getModule() public méthode

public getModule ( ) : Module
Résultat Nwidart\Modules\Module

getNextBatchNumber() public méthode

Get the next migration batch number.
public getNextBatchNumber ( ) : integer
Résultat integer

getPath() public méthode

Get migration path.
public getPath ( ) : string
Résultat string

getRan() public méthode

Get the ran migrations.
public getRan ( ) : Collection
Résultat Illuminate\Support\Collection

log() public méthode

Save new migration to database.
public log ( string $migration ) : mixed
$migration string
Résultat mixed

requireFiles() public méthode

Require in all the migration files in a given path.
public requireFiles ( array $files )
$files array

reset() public méthode

Reset migration.
public reset ( ) : array
Résultat array

resolve() public méthode

Resolve a migration instance from a file.
public resolve ( string $file ) : object
$file string
Résultat object

rollback() public méthode

Rollback migration.
public rollback ( ) : array
Résultat array

setDatabase() public méthode

Set the database connection to be used
public setDatabase ( $database )
$database

table() public méthode

Get table instance.
public table ( ) : string
Résultat string

up() public méthode

Run up schema from the given migration name.
public up ( string $migration )
$migration string

Property Details

$database protected_oe property

The database connection to be used
protected string $database
Résultat string

$laravel protected_oe property

Laravel Application instance.
protected Application.,Illuminate\Foundation $laravel
Résultat Illuminate\Foundation\Application.

$module protected_oe property

Pingpong Module instance.
protected Module,Nwidart\Modules $module
Résultat Nwidart\Modules\Module