src/ModelFilter.php
public function getFormData($field = null)
    {
        $filters = session('bzarzuela.filters');

        if (isset($filters[$this->key]['form_data'])) {

            if (! is_null($field)) {

                if (! isset($filters[$this->key]['form_data'][$field])) {
                    return null;
                }

                return $filters[$this->key]['form_data'][$field];
            }

            return $filters[$this->key]['form_data'];
        }

        if (! is_null($field)) {
            return null;
        }

        return [];
    }
public function getFormData($field = null)
    {
        $filters = session('bzarzuela.filters');

        if (isset($filters[$this->key]['form_data'])) {

            if (! is_null($field)) {

                if (! isset($filters[$this->key]['form_data'][$field])) {
                    return null;
                }

                return $filters[$this->key]['form_data'][$field];
            }

            return $filters[$this->key]['form_data'];
        }

        if (! is_null($field)) {
            return null;
        }

        return [];
    }
public function getFormData ( $ field = null ) { $ filters = session ( 'bzarzuela.filters' ) ; if ( isset ( $ filters [ $ this -> key ] [ 'form_data' ] ) ) { if ( ! is_null ( $ field ) ) { if ( ! isset ( $ filters [ $ this -> key ] [ 'form_data' ] [ $ field ] ) ) { return null ; } return $ filters [ $ this -> key ] [ 'form_data' ] [ $ field ] ; } return $ filters [ $ this -> key ] [ 'form_data' ] ; } if ( ! is_null ( $ field ) ) { return null ; } return [ ] ; }
Gets either the whole form data or just a field inside.

@param null $field
@return array|null
Gets either the whole form data or just a field inside .