64 lines
2.9 KiB
PHP
Executable File
64 lines
2.9 KiB
PHP
Executable File
@extends('layout.master')
|
|
@push('plugin-styles')
|
|
<link href="{{ asset('assets/plugins/datatables-net-bs5/dataTables.bootstrap5.css') }}" rel="stylesheet"/>
|
|
<style>
|
|
.editBtn{
|
|
margin-right: 10px;
|
|
}
|
|
</style>
|
|
@endpush
|
|
|
|
@section('content')
|
|
@include('admin.partials.breadcrumb', ['page'=>'Страны'])
|
|
<div class="row">
|
|
<div class="col-md-12 grid-margin stretch-card">
|
|
<div class="card">
|
|
<div class="card-header d-flex justify-content-between">
|
|
<h6 class="card-title">Страны</h6>
|
|
<a href="{{ route('admin.countries.create') }}" class="btn btn-primary">Создать</a>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="table-responsive">
|
|
<table id="dataTableExample" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>id Страны</th>
|
|
<th>Когда создана</th>
|
|
<th>Когда обновлена</th>
|
|
<th>Действия</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($countries as $country)
|
|
<tr>
|
|
<td>{{ $country->id }}</td>
|
|
<td>{{ $country->created_at }}</td>
|
|
<td>{{ $country->updated_at }}</td>
|
|
<td class="d-flex align-items-center">
|
|
<a href="{{ route('admin.countries.edit', $country->id) }}" class="btn btn-success editBtn">
|
|
Редактировать
|
|
</a>
|
|
<form action="{{ route('admin.countries.destroy', $country->id) }}" method="POST">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-danger">Удалить</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
@push('plugin-scripts')
|
|
<script src="{{ asset('assets/plugins/datatables-net/jquery.dataTables.js') }}"></script>
|
|
<script src="{{ asset('assets/plugins/datatables-net-bs5/dataTables.bootstrap5.js') }}"></script>
|
|
@endpush
|
|
|
|
@push('custom-scripts')
|
|
<script src="{{ asset('assets/js/data-table.js') }}"></script>
|
|
@endpush |