Ejemplo n.º 1
0
 /**
  * Get a subset of the items from the input data.
  *
  * @param  array  $keys
  * @return array
  */
 public function only($keys)
 {
     $keys = is_array($keys) ? $keys : func_get_args();
     $results = [];
     $inputs = $this->all();
     foreach ($keys as $key) {
         Arrays::set($results, $key, Arrays::get($inputs, $key));
     }
     return $results;
 }