PHP Класс Schema, someline-starter

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

blueprintResolver() публичный статический Метод

Set the Schema Blueprint resolver callback.
public static blueprintResolver ( Closure $resolver ) : void
$resolver Closure
Результат void

create() публичный статический Метод

Create a new table on the schema.
public static create ( string $table, Closure $callback ) : Illuminate\Database\Schema\Blueprint
$table string
$callback Closure
Результат Illuminate\Database\Schema\Blueprint

disableForeignKeyConstraints() публичный статический Метод

Disable foreign key constraints.
public static disableForeignKeyConstraints ( ) : boolean
Результат boolean

drop() публичный статический Метод

Drop a table from the schema.
public static drop ( string $table ) : Illuminate\Database\Schema\Blueprint
$table string
Результат Illuminate\Database\Schema\Blueprint

dropIfExists() публичный статический Метод

Drop a table from the schema if it exists.
public static dropIfExists ( string $table ) : Illuminate\Database\Schema\Blueprint
$table string
Результат Illuminate\Database\Schema\Blueprint

enableForeignKeyConstraints() публичный статический Метод

Enable foreign key constraints.
public static enableForeignKeyConstraints ( ) : boolean
Результат boolean

getColumnListing() публичный статический Метод

Get the column listing for a given table.
public static getColumnListing ( string $table ) : array
$table string
Результат array

getColumnType() публичный статический Метод

Get the data type for the given column name.
public static getColumnType ( string $table, string $column ) : string
$table string
$column string
Результат string

getConnection() публичный статический Метод

Get the database connection instance.
public static getConnection ( ) : Connection
Результат Illuminate\Database\Connection

hasColumn() публичный статический Метод

Determine if the given table has a given column.
public static hasColumn ( string $table, string $column ) : boolean
$table string
$column string
Результат boolean

hasColumns() публичный статический Метод

Determine if the given table has given columns.
public static hasColumns ( string $table, array $columns ) : boolean
$table string
$columns array
Результат boolean

hasTable() публичный статический Метод

Determine if the given table exists.
public static hasTable ( string $table ) : boolean
$table string
Результат boolean

rename() публичный статический Метод

Rename a table on the schema.
public static rename ( string $from, string $to ) : Illuminate\Database\Schema\Blueprint
$from string
$to string
Результат Illuminate\Database\Schema\Blueprint

setConnection() публичный статический Метод

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

table() публичный статический Метод

Modify a table on the schema.
public static table ( string $table, Closure $callback ) : Illuminate\Database\Schema\Blueprint
$table string
$callback Closure
Результат Illuminate\Database\Schema\Blueprint