{{-- resources/views/accounting/budgets/create.blade.php --}} @extends('admin.admin_dashboard') @section('admin') {{-- jQuery & Select2 --}} @php // If there's old input (validation fail), use that; otherwise start with one empty row $lines = old('lines', [ ['account_id' => null, 'period' => null, 'amount' => null] ]); @endphp
{{-- Validation Errors --}} @if($errors->any())
    @foreach($errors->all() as $err)
  • {{ $err }}
  • @endforeach
@endif
@csrf {{-- Header --}}

{{-- Line Items --}}
Line Items
@foreach($lines as $i => $line) @endforeach
Account Period Amount
{{-- Dynamic Add/Remove + Select2 --}} @endsection