Commit c576c388 authored by Taylor Otwell's avatar Taylor Otwell

added support for sequence to eloquent models.

parent 8688270f
...@@ -13,6 +13,20 @@ abstract class Model { ...@@ -13,6 +13,20 @@ abstract class Model {
*/ */
public static $connection; public static $connection;
/**
* Indicates if the model has creation and update timestamps.
*
* @var bool
*/
public static $timestamps = false;
/**
* The name of the auto-incrementing sequence associated with the model.
*
* @var string
*/
public static $sequence = null;
/** /**
* The model query instance. * The model query instance.
* *
...@@ -362,7 +376,7 @@ abstract class Model { ...@@ -362,7 +376,7 @@ abstract class Model {
} }
else else
{ {
$success = is_numeric($this->attributes['id'] = $this->query->insert_get_id($this->attributes)); $success = is_numeric($this->attributes['id'] = $this->query->insert_get_id($this->attributes, static::$sequence));
} }
($this->exists = true) and $this->dirty = array(); ($this->exists = true) and $this->dirty = array();
......
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