first change
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Title')->required() }}
|
||||
{{ html()->div('Please Enter Title')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Product')->class('form-label') }}
|
||||
{{ html()->select('product_id', $products)->class('form-control select2')->placeholder('Select Product')->required() }}
|
||||
{{ html()->div('Please Select Product')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Category')->class('form-label') }}
|
||||
{{ html()->select('category_id', $categories)->class('form-control select2')->placeholder('Select Category') }}
|
||||
{{ html()->div('Please Select Category')->class('invalid-feedback') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Caption')->class('form-label') }}
|
||||
{{ html()->textarea('caption')->class('form-control ckeditor-classic') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card -->
|
||||
|
||||
<div class="col-lg-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row gy-3">
|
||||
@php
|
||||
$filteredStatus = array_filter(
|
||||
$status,
|
||||
function ($key) {
|
||||
return $key == 11; // Only include 'Draft'
|
||||
},
|
||||
ARRAY_FILTER_USE_KEY,
|
||||
);
|
||||
@endphp
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', $filteredStatus)->class('form-control select2') }}
|
||||
</div>
|
||||
|
||||
<x-form-buttons :editable="$editable" label="Add" href="{{ route('content.index') }}" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Document</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Image')->class('form-label visually-hidden') }}
|
||||
{{ html()->file('creative')->class('form-control dropify')->attributes([
|
||||
'data-default-file' => $editable ? asset('storage/' . $content?->creative) : null,
|
||||
'data-height' => 200,
|
||||
]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
Reference in New Issue
Block a user