89 lines
3.1 KiB
PHP
89 lines
3.1 KiB
PHP
<div class="row">
|
|
<div class="col-lg-9">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row gy-1">
|
|
<div class="col-md-6">
|
|
{{ html()->label('Product Name')->class('form-label') }}
|
|
{{ html()->text('name')->class('form-control')->placeholder('Enter Product Name')->required() }}
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
{{ html()->label('Product Code')->class('form-label') }}
|
|
{{ html()->text('code')->class('form-control')->placeholder('Enter Product Code')->required() }}
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
{{ html()->label('Category')->class('form-label') }}
|
|
{{ html()->select('category_id', $category)->class('form-select select2')->placeholder('Select Category')->id('category_id') }}
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
{{ html()->label('Price')->class('form-label') }}
|
|
{{ html()->text('price')->class('form-control product-price cleave-numeral rate~~')->placeholder('Enter Price')->attributes(['onkeyup' => 'validateNumericInput(this)'])->required() }}
|
|
</div>
|
|
|
|
|
|
<div class="col-md-12">
|
|
{{ html()->label('Description')->class('form-label') }}
|
|
{{ html()->textarea('desc')->class('form-control')->placeholder('Enter Description') }}
|
|
</div>
|
|
|
|
<div class="col-md-12">
|
|
{{ html()->label('Remarks')->class('form-label') }}
|
|
{{ html()->textarea('remarks')->class('form-control')->placeholder('Enter Remarks') }}
|
|
</div>
|
|
|
|
</div>
|
|
<!-- end card -->
|
|
</div>
|
|
<!-- end card -->
|
|
|
|
</div>
|
|
<div class="mb-3 text-end">
|
|
<a href="{{ route('product.index') }}" class="btn btn-danger w-sm">Cancel</a>
|
|
<button type="submit" class="btn btn-success w-sm">Save</button>
|
|
</div>
|
|
</div>
|
|
<!-- end col -->
|
|
<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">
|
|
<div class="col-md-12">
|
|
{{ html()->label('Status')->class('form-label') }}
|
|
{{ html()->select('status', $status)->class('form-control')->placeholder('Select Status')->required() }}
|
|
</div>
|
|
</div>
|
|
<!-- end card -->
|
|
</div>
|
|
<!-- end col -->
|
|
</div>
|
|
|
|
@push('js')
|
|
{{-- <script>
|
|
$(document).on('change', '#category_id', function(e) {
|
|
e.preventDefault();
|
|
var category_id = $(this).val();
|
|
if (category_id) {
|
|
$.ajax({
|
|
type: "GET",
|
|
url: "{{ route('getSubCategories') }}" ,
|
|
data: {
|
|
'category_id': category_id
|
|
},
|
|
dataType: "json",
|
|
success: function(response) {
|
|
$('#sub_category_id').html('<option value="#" selected disabled>Select Sub Category</option>');
|
|
$.each(response.message, function(key, value) {
|
|
$('#sub_category_id').append('<option value=' + value.id + '>' + value.title + '</option>');
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
</script> --}}
|
|
@endpush |