{{-- resources/views/accounting/budgets/edit.blade.php --}} @extends('admin.admin_dashboard') @section('admin') {{-- jQuery & Select2 --}} @php // prepare old input or existing lines $lines = old('lines') ?? $budget->lines->map(fn($l)=>[ 'account_id'=>$l->account_id, 'period' =>$l->period, 'amount' =>$l->amount, ])->toArray(); @endphp
{{-- Validation Errors --}} @if($errors->any())
    @foreach($errors->all() as $err)
  • {{ $err }}
  • @endforeach
@endif
@csrf @method('PUT') {{-- Header --}}

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