/** * Remove an item from this collection. * * @param $key * @throws Exception */ public function remove($key) { if (!array_key_exists($key, $this->attributes)) { throw new Exception("Invalid key '{$key}'"); } return Arr::remove($key, $this->attributes); }
/** * Merge route groups. * * @param $new * @param $old * @return array */ protected function mergeGroups($new, $old) { $notMerged = ['prefix']; $new['prefix'] = self::mergeGroupPrefix($old, $new); return array_merge_recursive(Arr::except((array) $old, $notMerged), $new); }