Forked from whoisryosuke/laravel-loop-through-old-flash.php
          
        
    
          Created
          June 22, 2020 03:40 
        
      - 
      
- 
        Save bran921007/4cb43baa275167f82a02fc01cf43d8aa to your computer and use it in GitHub Desktop. 
    Laravel - Get old form input values for array-based input
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| @if(old('uid_tag')) | |
| @foreach(old('uid_tag') as $product) | |
| <input type="text" name="uid_tag[]" value="{{ old('uid_tag')[$loop->index] }}" size="30" /> | |
| <textarea | |
| placeholder="Include weight or count" | |
| name="product_description[]" | |
| cols="45" | |
| rows="1" | |
| value="{{ old('product_description')[$loop->index] }}" | |
| aria-required="true" | |
| ></textarea> | |
| <input type="text" name="qty_ordered[]" value="{{ old('qty_ordered')[$loop->index] }}" size="3" /> | |
| <input type="text" name="unit_cost[]" value="{{ old('unit_cost')[$loop->index] }}" /> | |
| <input type="text" name="total_cost[]" value="{{ old('total_cost')[$loop->index] }}" /> | |
| @endforeach | |
| @endif | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment