Improve removing keys
This commit is contained in:
parent
edb14d5ad7
commit
bbd0f8ddef
|
@ -156,7 +156,13 @@ public function all()
|
|||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
$this->content = collect($this->content)->forget($key)->all();
|
||||
if (is_array($key)) {
|
||||
foreach ($key as $k) {
|
||||
data_forget($this->content, $k);
|
||||
}
|
||||
} else {
|
||||
data_forget($this->content, $key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user