Skip to content

Commit

Permalink
Update docs for new old() method signature
Browse files Browse the repository at this point in the history
  • Loading branch information
mzur committed Feb 19, 2023
1 parent 1b3d488 commit 6b0fcc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ These are only the most important methods of `Uniform\Form`. For all methods che

Redirect back to the previous URL. This method should be called [after all form actions](usage).

## old($key)
## old($key, $default = '')

Get the data that was flashed to the session

Expand All @@ -15,7 +15,7 @@ This method does not work for some types of form fields (such as `type="file"`).
Return: `mixed`

```html+php
<input type="text" name="name" value="<?php echo $form->old('name') ?>">
<input type="text" name="name" value="<?php echo $form->old('name', 'Joe User') ?>">
```

## error($key = '')
Expand Down

0 comments on commit 6b0fcc1

Please sign in to comment.