Request::except PHP Method

except() public static method

Get all of the input except for a specified array of items.
public static except ( array | mixed $keys ) : array
$keys array | mixed
return array
        public static function except($keys)
        {
            return \Illuminate\Http\Request::except($keys);
        }

Usage Example

Example #1
0
 /**
  * Method fired after the Save action is complete.
  * 
  * @return
  */
 protected function afterSave()
 {
     $this->brokenAfterSave = false;
     foreach (\Request::except('_token') as $key => $value) {
         // Could swap this out for model -> getAttribute, then check if we have an attribute or a relation... getRelationValue() is helpful
         if (method_exists($this->model, $key) && is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\\Database\\Eloquent\\Relations\\Relation')) {
             $this->saveRelation('afterSave', $key, $value);
         }
     }
 }
All Usage Examples Of Request::except