Skip to content

Commit b3eee83

Browse files
authored
📝 adding some basic usage configuration
1 parent fdef267 commit b3eee83

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ Next add the package service provider to your providers configuration in Laravel
1919
```
2020

2121
Now you can assign the middleware `remember.files` to routes that you want the packages functionality to operate on.
22+
23+
## Usage
24+
25+
To ensure that remembered files remain as such accross page refreshes (due to other validation errors) you need to include a reference by way of using a hidden input field with the name `_rememberedFiles`.
26+
27+
```
28+
@if( $oldFile = oldFile('file'))
29+
<input type="hidden" name="_rememberedFiles[file]" value="{{ $oldFile->getFilename() }}">
30+
@endif
31+
```

0 commit comments

Comments
 (0)