PHP Class Schema, someline-starter

Mostrar archivo Open project: someline/someline-starter Class Usage Examples

Public Methods

Method Description
blueprintResolver ( Closure $resolver ) : void Set the Schema Blueprint resolver callback.
create ( string $table, Closure $callback ) : Illuminate\Database\Schema\Blueprint Create a new table on the schema.
disableForeignKeyConstraints ( ) : boolean Disable foreign key constraints.
drop ( string $table ) : Illuminate\Database\Schema\Blueprint Drop a table from the schema.
dropIfExists ( string $table ) : Illuminate\Database\Schema\Blueprint Drop a table from the schema if it exists.
enableForeignKeyConstraints ( ) : boolean Enable foreign key constraints.
getColumnListing ( string $table ) : array Get the column listing for a given table.
getColumnType ( string $table, string $column ) : string Get the data type for the given column name.
getConnection ( ) : Connection Get the database connection instance.
hasColumn ( string $table, string $column ) : boolean Determine if the given table has a given column.
hasColumns ( string $table, array $columns ) : boolean Determine if the given table has given columns.
hasTable ( string $table ) : boolean Determine if the given table exists.
rename ( string $from, string $to ) : Illuminate\Database\Schema\Blueprint Rename a table on the schema.
setConnection ( Connection $connection ) Set the database connection instance.
table ( string $table, Closure $callback ) : Illuminate\Database\Schema\Blueprint Modify a table on the schema.

Method Details

blueprintResolver() public static method

Set the Schema Blueprint resolver callback.
public static blueprintResolver ( Closure $resolver ) : void
$resolver Closure
return void

create() public static method

Create a new table on the schema.
public static create ( string $table, Closure $callback ) : Illuminate\Database\Schema\Blueprint
$table string
$callback Closure
return Illuminate\Database\Schema\Blueprint

disableForeignKeyConstraints() public static method

Disable foreign key constraints.
public static disableForeignKeyConstraints ( ) : boolean
return boolean

drop() public static method

Drop a table from the schema.
public static drop ( string $table ) : Illuminate\Database\Schema\Blueprint
$table string
return Illuminate\Database\Schema\Blueprint

dropIfExists() public static method

Drop a table from the schema if it exists.
public static dropIfExists ( string $table ) : Illuminate\Database\Schema\Blueprint
$table string
return Illuminate\Database\Schema\Blueprint

enableForeignKeyConstraints() public static method

Enable foreign key constraints.
public static enableForeignKeyConstraints ( ) : boolean
return boolean

getColumnListing() public static method

Get the column listing for a given table.
public static getColumnListing ( string $table ) : array
$table string
return array

getColumnType() public static method

Get the data type for the given column name.
public static getColumnType ( string $table, string $column ) : string
$table string
$column string
return string

getConnection() public static method

Get the database connection instance.
public static getConnection ( ) : Connection
return Illuminate\Database\Connection

hasColumn() public static method

Determine if the given table has a given column.
public static hasColumn ( string $table, string $column ) : boolean
$table string
$column string
return boolean

hasColumns() public static method

Determine if the given table has given columns.
public static hasColumns ( string $table, array $columns ) : boolean
$table string
$columns array
return boolean

hasTable() public static method

Determine if the given table exists.
public static hasTable ( string $table ) : boolean
$table string
return boolean

rename() public static method

Rename a table on the schema.
public static rename ( string $from, string $to ) : Illuminate\Database\Schema\Blueprint
$from string
$to string
return Illuminate\Database\Schema\Blueprint

setConnection() public static method

Set the database connection instance.
public static setConnection ( Connection $connection )
$connection Illuminate\Database\Connection

table() public static method

Modify a table on the schema.
public static table ( string $table, Closure $callback ) : Illuminate\Database\Schema\Blueprint
$table string
$callback Closure
return Illuminate\Database\Schema\Blueprint