Merge branch 'staging' into develop
This commit is contained in:
@@ -385,6 +385,19 @@ abstract class Model {
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the model from the database.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
if ($this->exists)
|
||||
{
|
||||
return $this->query()->where(static::$key, '=', $this->get_key())->delete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the update and creation timestamps on the model.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user