Exemplo n.º 1
0
 /**
  * Remove values from an array that match entries marked as immutable in the collection.
  *
  * @param $vars
  *
  * @return mixed
  */
 protected function filter_immutables($vars)
 {
     $candidates = [];
     foreach ($vars as $key => $value) {
         if (array_key_exists($key, $this->read_only)) {
             $candidates[] = $key;
         }
     }
     Arr::forget($candidates, $vars);
     return $vars;
 }
Exemplo n.º 2
0
 /**
  * Using the provided arrays.php helper, delete elements that
  * match the dot-notation index.
  *
  * @param       $dot_path
  * @param       $target_value
  */
 public function delete($dot_path, $target_value)
 {
     Arr::forget($this->get($dot_path), $target_value);
 }