@extends('layouts.admin') @section('title', ($record ? 'Edit' : 'Create') . ' Documents') @section('content') @include('institution.partials.flash') @csrf @if(($formMethod ?? 'POST') !== 'POST') @method($formMethod) @endif Select Application @foreach(\App\Models\Application::query()->orderByDesc('id')->limit(200)->get(['id','application_number']) as $opt) application_id ?? '') == $opt->id)>{{ $opt->application_number }} @endforeach Application * @error('application_id'){{ $message }}@enderror Select Applicant @foreach(\App\Models\Applicant::query()->orderBy('last_name')->limit(200)->get(['id','first_name','last_name','email']) as $opt) applicant_id ?? '') == $opt->id)>{{ trim($opt->first_name.' '.$opt->last_name) }} ({{ $opt->email }}) @endforeach Applicant * @error('applicant_id'){{ $message }}@enderror Title * @error('title'){{ $message }}@enderror Select type @foreach(\App\Enums\ApplicationDocumentType::cases() as $type) value)>{{ method_exists($type, 'label') ? $type->label() : $type->name }} @endforeach Document type * @error('document_type'){{ $message }}@enderror File * @error('file'){{ $message }}@enderror {{ old('notes', $record->notes ?? '') }} Notes @error('notes'){{ $message }}@enderror {{ $record ? 'Update' : 'Create' }} Cancel @endsection