fixed bug when deleting eloquent models.
This commit is contained in:
@@ -8,7 +8,7 @@ class Warehouse {
|
||||
* @param object $eloquent
|
||||
* @return bool
|
||||
*/
|
||||
public static function store($eloquent)
|
||||
public static function put($eloquent)
|
||||
{
|
||||
$model = get_class($eloquent);
|
||||
|
||||
@@ -39,6 +39,17 @@ class Warehouse {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an Eloquent model from the database.
|
||||
*
|
||||
* @param object $eloquent
|
||||
* @return bool
|
||||
*/
|
||||
public static function forget($eloquent)
|
||||
{
|
||||
return (\System\DB::table(Meta::table(get_class($eloquent)))->where('id', '=', $eloquent->id)->delete() == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the activity timestamps on a model.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user