1
0

Improve removing keys

This commit is contained in:
Richard Dern 2024-05-03 16:15:43 +02:00
parent edb14d5ad7
commit bbd0f8ddef

View File

@ -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);
}
}
/**