<commit_before># laravel-remember-uploads

**[Please Note]**: This package is currently a work in progress and has been initially developed for Laravel 5.4.

## Install

Add to your project with compoer via `composer require photogabble/laravel-remember-uploads`.

Next add the package service provider to your providers configuration in Laravel.

```php
'providers' => [
    // ...
    
    Photogabble\LaravelRememberUploads\RememberUploadsServiceProvider::class,
    
    // ...
],
```

Now you can assign the middleware `remember.files` to routes that you want the packages functionality to operate on.

## Usage

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`.

```php
@if( $oldFile = oldFile('file'))
    <input type="hidden" name="_rememberedFiles[file]" value="{{ $oldFile->getFilename() }}">
@else
    <input type="file" name="file"><commit_msg>:memo: prettify the heading<commit_after><h1 align="center">Laravel Remember Uploads</h1>
<p align="center"><em>Middleware Package</em></p>

<p align="center">
  <a href="https://packagist.org/packages/photogabble/laravel-remember-uploads"><img src="https://poser.pugx.org/photogabble/laravel-remember-uploads/v/stable.svg" alt="Latest Stable Version"></a>
  <a href="LICENSE"><img src="https://poser.pugx.org/photogabble/laravel-remember-uploads/license.svg" alt="License"></a>
</p>

## Install

Add to your project with compoer via `composer require photogabble/laravel-remember-uploads`.

Next add the package service provider to your providers configuration in Laravel.

```php
'providers' => [
    // ...
    
    Photogabble\LaravelRememberUploads\RememberUploadsServiceProvider::class,
    
    // ...
],
```

Now you can assign the middleware `remember.files` to routes that you want the packages functionality to operate on.

## Usage

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`.

```php
@if( $oldFile = oldFile('file'))
    <input type="hidden" name="_rememberedFiles[file]" value="{{ $oldFile->getFilename() }}">
@else
    <input type="file" name="file">
{'fraction_non_alphanumeric': 0.12612227447627192, 'fraction_numerical': 0.0017101325352714834, 'mean_word_length': 4.6658595641646485, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5945612', 'n_tokens_mistral': 712, 'n_tokens_neox': 676, 'n_words': 226}