Example #1
0
 /**
  * Merge the given group attributes.
  *
  * @param  array  $new
  * @param  array  $old
  * @return array
  */
 public static function mergeGroup($new, $old)
 {
     $new['namespace'] = static::formatUsesPrefix($new, $old);
     $new['prefix'] = static::formatGroupPrefix($new, $old);
     if (isset($new['domain'])) {
         unset($old['domain']);
     }
     $new['where'] = array_merge(isset($old['where']) ? $old['where'] : [], isset($new['where']) ? $new['where'] : []);
     if (isset($old['as'])) {
         $new['as'] = $old['as'] . (isset($new['as']) ? $new['as'] : '');
     }
     return array_merge_recursive(Arr::except($old, ['namespace', 'prefix', 'where', 'as']), $new);
 }
Example #2
0
 /**
  * Get all of the given array except for a specified array of items.
  *
  * @param  array  $array
  * @param  array|string  $keys
  * @return array
  */
 function array_except($array, $keys)
 {
     return Arr::except($array, $keys);
 }
Example #3
0
 /**
  * Get all items except for those with the specified keys.
  *
  * @param  mixed  $keys
  * @return static
  */
 public function except($keys)
 {
     $keys = is_array($keys) ? $keys : func_get_args();
     return new static(Arr::except($this->items, $keys));
 }