<form class="row g-3 auto-width" action="{{ route('subjects.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-12">
        <label for="validationTextarea" class="form-label">Image (828x490)</label>
        <input type="file" class="form-control" name="image" aria-label="file example">
        <div class="invalid-feedback">Example invalid form file </div>
    </div>
    <div class="col-md-12">
        <label for="validationCustomMetaTitle" class="form-label">Meta Title </label>
        <input type="text" class="form-control" id="validationCustomMetaTitle" name="meta_title" aria-describedby="inputGroupPrepend" value="{!! $data->meta_title !!}" required>
        @if ($errors->has('meta_title'))
        <span class="text-danger">{{ $errors->first('meta_title') }}</span>
        @endif
        <span class="text-danger error_name" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="validationCustomMetaKeywords" class="form-label">Meta Keywords </label>
        <input type="text" class="form-control" id="validationCustomMetaKeywords" name="meta_keywords" aria-describedby="inputGroupPrepend" value="{!! $data->meta_keywords !!}" required>
        @if ($errors->has('meta_keywords'))
        <span class="text-danger">{{ $errors->first('meta_keywords') }}</span>
        @endif
        <span class="text-danger error_name" style="display: none;">This field is required.</span>
    </div>
    <div class="col-md-12">
        <label for="validationTextarea" class="form-label">Open Graph Image(1200x630)</label>
        <input type="file" class="form-control" name="open_graph_image" aria-label="file example">
        <div class="invalid-feedback">Example invalid form file </div>
    </div>
    <div class="col-md-12">
        <label for="validationCustomMetaDescription" class="form-label">Meta Description </label>
        <textarea class="form-control" id="validationCustomMetaDescription" name="meta_description" aria-describedby="inputGroupPrepend" required>{!! $data->meta_description !!}</textarea>
        @if ($errors->has('meta_description'))
        <span class="text-danger">{{ $errors->first('meta_description') }}</span>
        @endif
        <span class="text-danger error_name" style="display: none;">This field is required.</span>
    </div>
</form>
