protected function setInputValues() { if (Session::exists($this->_inputSessionKey)) { $values = Session::get($this->_inputSessionKey); foreach ($values as $key => $value) { $item = input()->getObject($key, new InputItem($key), ['get', 'post'])->setValue($value); if (request()->getMethod() === 'post') { input()->post[$key] = $item; } else { input()->get[$key] = $item; } } Session::destroy($this->_inputSessionKey); } }
public function validates() { return (bool) Session::exists($this->sessionName); }