a flock of bugfixes
This commit is contained in:
parent
8ab469e017
commit
b0cb0db558
2 changed files with 5 additions and 9 deletions
|
@ -34,10 +34,10 @@ class Item extends Model
|
|||
|
||||
public static function create(array $attributes = [])
|
||||
{
|
||||
$uid = static::query()->where('eid',$attributes['eid'])->max('uid') + 1;
|
||||
$uid = static::query()->withTrashed()->where('eid',$attributes['eid'])->max('uid') + 1;
|
||||
$attributes['uid'] = $uid;
|
||||
static::query()->create($attributes);
|
||||
return Item::find($uid);
|
||||
$item = static::query()->create($attributes);
|
||||
return Item::find($item->iid);
|
||||
}
|
||||
|
||||
protected static function extended($columns=Array()){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue