first commit
This commit is contained in:
5
resources/views/admin/country/_form.blade.php
Executable file
5
resources/views/admin/country/_form.blade.php
Executable file
@ -0,0 +1,5 @@
|
||||
<div class="d-flex justify-content-between">
|
||||
<button type="submit" class="btn btn-primary me-2">
|
||||
@isset($country) Обновить @else Сохранить @endisset
|
||||
</button>
|
||||
</div>
|
22
resources/views/admin/country/create.blade.php
Executable file
22
resources/views/admin/country/create.blade.php
Executable file
@ -0,0 +1,22 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('admin.partials.breadcrumb', ['subPage'=>'Создать', 'page'=>'Cnhfys', 'pageUrl'=>route('admin.countries.index')])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h6 class="card-title">Создание Страны</h6>
|
||||
<form action="{{ route('admin.countries.store') }}" method="POST" enctype="multipart/form-data" class="forms-sample">
|
||||
@csrf
|
||||
@include('admin.country._form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
23
resources/views/admin/country/edit.blade.php
Executable file
23
resources/views/admin/country/edit.blade.php
Executable file
@ -0,0 +1,23 @@
|
||||
@extends('layout.master')
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('admin.partials.breadcrumb', ['subPage'=>'Изменить', 'page'=>'Страны', 'pageUrl'=>route('admin.countries.index')])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h6 class="card-title">Изменения страны</h6>
|
||||
<form action="{{ route('admin.countries.update', $country->id) }}" method="POST" enctype="multipart/form-data" class="forms-sample">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
@include('admin.country._form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
64
resources/views/admin/country/index.blade.php
Executable file
64
resources/views/admin/country/index.blade.php
Executable file
@ -0,0 +1,64 @@
|
||||
@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
|
Reference in New Issue
Block a user