Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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);
 }