Current File : /home/tradevaly/new.tradevaly.com.bd/resources/views/backend/pages/featureCategory/index.blade.php |
@extends('backend.ayaan.master')
@section('title') Featured Products @endsection
@section('css')
<!-- DataTables -->
<link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css" />
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Dashboards @endslot
@slot('title') Featured Products @endslot
@endcomponent
<div class="row">
<div class="col-md-6">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row mb-2">
<div class="col-sm-4">Featured Products</div>
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="text-center">#</th>
<th>{{translate('Title')}}</th>
<th>{{translate('Details')}}</th>
<th>{{translate('Link')}}</th>
<th class="text-right">{{translate('Actions')}}</th>
</tr>
</thead>
<tbody>
@php
$i = 0;
@endphp
@foreach ($features as $feature)
<tr>
<?php $i++; ?>
<td class="text-center">{{$i}}</td>
<td>{{$feature['name']}}</td>
<td class="td-actions text-right">
<a href="{{url('b2b/features/edit',$feature->id)}}" class="btn btn-rose" title="Edit" style="color: #fff">
<i class="material-icons">edit</i>
</a>
<a href="{{url('b2b/features/delete',$feature->id)}}" name="about" class="btn btn-danger confirmDelete" title="Delete" style="color: #fff">
<i class="material-icons">close</i>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h4 class="card-title">Add Featured</h4>
<p class="card-title-desc">Fill all information below</p>
<form action="{{url('b2b/features/add')}}" method="POST">@csrf
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="bmd-label-floating">{{translate('Feature name')}}</label>
<input type="text" name="title" class="form-control" required>
</div>
</div>
<div class="d-flex flex-wrap gap-2">
<button type="submit" class="btn btn-primary waves-effect waves-light">Save Changes</button>
<button type="submit" class="btn btn-secondary waves-effect waves-light">Cancel</button>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('script')
<!-- Required datatable js -->
<script src="{{ asset('/assets/libs/datatables/datatables.min.js') }}"></script>
<script src="{{ asset('/assets/libs/jszip/jszip.min.js') }}"></script>
<script src="{{ asset('/assets/libs/pdfmake/pdfmake.min.js') }}"></script>
<!-- Datatable init js -->
<script src="{{ asset('/assets/libs/select2/select2.min.js') }}"></script>
<!-- init js -->
<script src="{{ asset('/assets/js/pages/ecommerce-select2.init.js') }}"></script>
<script type="text/javascript">
$(function () {
$(document).ready(function () {
var table = $('.table').DataTable({
lengthChange: false,
processing: true,
});
table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
$(".dataTables_length select").addClass('form-select form-select-sm');
});
});
</script>
@endsection