PHP 클래스 Nwidart\Modules\Migrations\Migrator

파일 보기 프로젝트 열기: nwidart/laravel-modules 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$database string The database connection to be used
$laravel Illuminate\Foundation\Application. Laravel Application instance.
$module Nwidart\Modules\Module Pingpong Module instance.

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

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

down() 공개 메소드

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

find() 공개 메소드

Find migration data from database by given migration name.
public find ( string $migration ) : object
$migration string
리턴 object

getLast() 공개 메소드

Get the last migration batch.
public getLast ( array $migrations ) : Collection
$migrations array
리턴 Illuminate\Support\Collection

getLastBatchNumber() 공개 메소드

Get the last migration batch number.
public getLastBatchNumber ( array $migrations ) : integer
$migrations array
리턴 integer

getMigrations() 공개 메소드

Get migration files.
public getMigrations ( boolean $reverse = false ) : array
$reverse boolean
리턴 array

getModule() 공개 메소드

public getModule ( ) : Module
리턴 Nwidart\Modules\Module

getNextBatchNumber() 공개 메소드

Get the next migration batch number.
public getNextBatchNumber ( ) : integer
리턴 integer

getPath() 공개 메소드

Get migration path.
public getPath ( ) : string
리턴 string

getRan() 공개 메소드

Get the ran migrations.
public getRan ( ) : Collection
리턴 Illuminate\Support\Collection

log() 공개 메소드

Save new migration to database.
public log ( string $migration ) : mixed
$migration string
리턴 mixed

requireFiles() 공개 메소드

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

reset() 공개 메소드

Reset migration.
public reset ( ) : array
리턴 array

resolve() 공개 메소드

Resolve a migration instance from a file.
public resolve ( string $file ) : object
$file string
리턴 object

rollback() 공개 메소드

Rollback migration.
public rollback ( ) : array
리턴 array

setDatabase() 공개 메소드

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

table() 공개 메소드

Get table instance.
public table ( ) : string
리턴 string

up() 공개 메소드

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

프로퍼티 상세

$database 보호되어 있는 프로퍼티

The database connection to be used
protected string $database
리턴 string

$laravel 보호되어 있는 프로퍼티

Laravel Application instance.
protected Application.,Illuminate\Foundation $laravel
리턴 Illuminate\Foundation\Application.

$module 보호되어 있는 프로퍼티

Pingpong Module instance.
protected Module,Nwidart\Modules $module
리턴 Nwidart\Modules\Module