Commit 879e56df by Taylor Otwell

Merge branch 'master' into develop

parents 0e4a6360 ca77cd5a
......@@ -120,9 +120,16 @@ class Schema {
{
foreach (array('primary', 'unique', 'fulltext', 'index') as $key)
{
if (isset($column->attributes[$key]))
if (isset($column->$key))
{
$table->$key($column->name);
if ($column->$key === true)
{
$table->$key($column->name);
}
else
{
$table->$key($column->name, $column->$key);
}
}
}
}
......
......@@ -77,4 +77,20 @@ class Fluent {
$this->attributes[$key] = $value;
}
/**
* Dynamically check if an attribute is set.
*/
public function __isset($key)
{
return isset($this->attributes[$key]);
}
/**
* Dynamically unset an attribute.
*/
public function __unset($key)
{
return unset($this->attributes[$key]);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment