@extends('layouts.app') @section('content') ePendakwaan Inventory/ Add New Serial Add New Serial @if ($message = Session::get('success')) {{ $message }} @endif @if ($message = Session::get('error')) {{ $message }} @endif @if ($errors->any()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif @csrf {{-- Debugging --}} @php $oldSerials = old('serialNo', []); $oldHolders = old('holder', []); $oldLocations = old('location', []); $oldStatuses = old('status', []); @endphp {{-- Ensure loopCount runs as expected --}} @for ($i = 0; $i < $loopCount; $i++) Item {{ $i + 1 }} Serial Number Tag Number Holder Location Select Location @foreach ($locations as $location) id ? 'selected' : '' }}> {{ $location->name }} @endforeach Status Select Status In Use/Active Damaged Lost/Not Found @endfor Submit @endsection