本文整理汇总了PHP中Illuminate\Session\Store::getOldInput方法的典型用法代码示例。如果您正苦于以下问题:PHP Store::getOldInput方法的具体用法?PHP Store::getOldInput怎么用?PHP Store::getOldInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Session\Store
的用法示例。
在下文中一共展示了Store::getOldInput方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: oldInput
/**
* @return MessageBag
*/
private function oldInput()
{
if (!isset($this->oldInput)) {
$this->oldInput = new MessageBag((array) $this->sessionStore->getOldInput());
}
return $this->oldInput;
}
示例2: edit
/**
* @return \Cocona\Core\Html\Elements\Form
*/
public function edit($id)
{
$form = $this->app->call([$this->resource, 'form']);
// Create the route param from the name
$param = str_replace('-', '_', snake_case($this->resource->name()));
$form->action($this->to('update', [$param => $id]));
// Spoof the form method and add the CSRF token
$form->hidden('_method', 'PUT');
$form->token();
// Fill the form with the model and overwrite it with
// the request if is available
$form->fill($this->resource->item($id), $this->session->getOldInput());
return $form;
}
示例3: getValueAttribute
/**
* Get the value that should be assigned to the field.
*
* @param string $name
* @param string $value
* @return string
*/
public function getValueAttribute($name, $value = null)
{
if (is_null($name)) {
return $value;
}
if (isset($this->session) and $this->session->hasOldInput($name)) {
return $this->session->getOldInput($name);
}
if (!is_null($value)) {
return $value;
}
if (isset($this->model) and isset($this->model[$name])) {
return $this->getModelValueAttribute($name);
}
}
示例4: getOldInput
/**
* Get the requested item from the flashed input array.
*
* @param string $key
* @param mixed $default
* @return mixed
* @static
*/
public static function getOldInput($key = null, $default = null)
{
return \Illuminate\Session\Store::getOldInput($key, $default);
}
示例5: oldInputIsEmpty
/**
* Determine if the old input is empty.
*
* @return bool
*/
public function oldInputIsEmpty()
{
return isset($this->session) && count($this->session->getOldInput()) == 0;
}
示例6: valueFromOld
/**
* Get the value from old input.
*
* @param string $name
* @return mixed|null
*/
protected function valueFromOld($name)
{
return $this->session->getOldInput($name);
}