Builder
class Builder (View source)
Properties
protected Connection | $connection | The database connection instance. |
|
protected Grammar | $grammar | The schema grammar instance. |
|
protected Closure | $resolver | The Blueprint resolver callback. |
Methods
Determine if the given table exists.
Determine if the given table has a given column.
Get the column listing for a given table.
Drop a table from the schema if it exists.
Get the database connection instance.
Details
void
__construct(Connection $connection)
Create a new database Schema manager.
bool
hasTable(string $table)
Determine if the given table exists.
bool
hasColumn(string $table, string $column)
Determine if the given table has a given column.
array
getColumnListing(string $table)
Get the column listing for a given table.
Blueprint
drop(string $table)
Drop a table from the schema.
Blueprint
dropIfExists(string $table)
Drop a table from the schema if it exists.
Blueprint
rename(string $from, string $to)
Rename a table on the schema.
protected void
build(Blueprint $blueprint)
Execute the blueprint to build / modify the table.
protected Blueprint
createBlueprint(string $table, Closure $callback = null)
Create a new command set with a Closure.
Connection
getConnection()
Get the database connection instance.
$this
setConnection(Connection $connection)
Set the database connection instance.
void
blueprintResolver(Closure $resolver)
Set the Schema Blueprint resolver callback.