<form class="row g-3 auto-width project_attachments" action="{{ route('project-attachments.update', $data->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('PUT')
    <div class="col-md-12">
        <label for="validationCustomTitle" class="form-label">Title <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="validationCustomTitle" name="title" aria-describedby="inputGroupPrepend" required value={{$data->title}}>
        @if ($errors->has('title'))
        <span class="text-danger">{{ $errors->first('title') }}</span>
        @endif
        <span class="text-danger error_title" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="validationCustomOrder" class="form-label">File/Image </label>
        <input name="is_featured" class="form-check-inputFeatured btn-lg isFeatured" type="checkbox" id="inlineCheckboxFeatured" value="0">
        @if ($errors->has('is_featured'))
        <span class="text-danger">{{ $errors->first('is_featured') }}</span>
        @endif
        <span class="text-danger error_name" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-12" id="div_file">
        <label class="form-label" id="url_label">File Url <span class="text-danger"><b>*</b></span></label>
        <input  type="text" class="form-control" id="url" name="file_url" aria-describedby="inputGroupPrepend" required placeholder="Enter Url" value="{{$data->file_url}}">
        @if ($errors->has('file_url'))
        <span class="text-danger">{{ $errors->first('file_url') }}</span>
        @endif
        <span class="text-danger error_file_url" style="display: none;">This field is required.</span>
    </div>

    <div class="col-md-12" id="div_image">
        <label class="form-label" id="image_label">Image <span class="text-danger"><b>*</b></span></label>
        <input type="file" class="form-control" id="image" name="file_url" aria-describedby="inputGroupPrepend" required placeholder="Select Image">

        @if ($errors->has('file_url'))
            <span class="text-danger">{{ $errors->first('file_url') }}</span>
        @endif

        <span class="text-danger error_file_url" style="display: none;">This field is required.</span>
    </div>
    <input type="hidden" name="projects_id">
</form>
