2024-04-23 14:52:49 +04:00
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container col-md-6">
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="card mt-4">
|
|
|
|
<div class="card-header">{{__('Поиск учителя')}}</div>
|
|
|
|
<div class="card-body">
|
|
|
|
<form action="{{ route('teachers.index') }}" method="GET">
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="name" class="form-label">ФИО:</label>
|
|
|
|
<input type="text" id="name" name="name" class="form-control" value="{{ request('name') ?? '' }}">
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<button type="submit" class="btn btn-primary">Фильтр</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card mt-4">
|
|
|
|
<div class="card-header">{{__('Учителя')}}</div>
|
|
|
|
<div class="card-body">
|
2024-05-06 17:47:25 +04:00
|
|
|
@if (count($teachers))
|
2024-04-23 14:52:49 +04:00
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
2024-05-03 12:42:37 +04:00
|
|
|
<th>ФИО</th>
|
2024-04-23 14:52:49 +04:00
|
|
|
<th> </th>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($teachers as $teacher)
|
|
|
|
<tr>
|
|
|
|
<td class="table-text">
|
|
|
|
<div>
|
|
|
|
<a href="{{ route('teachers.show', $teacher) }}" class="btn btn-block col-8">{{ $teacher->last_name }} {{ $teacher->name }} {{ $teacher->middle_name }}</a>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div>
|
|
|
|
<a href="{{ route('teachers.edit', $teacher) }}" class="btn btn-warning">Редактировать</a>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<form action="{{ route('teachers.destroy', $teacher) }}" method="POST" style="display: inline-block;">
|
|
|
|
@csrf
|
|
|
|
@method('DELETE')
|
|
|
|
<button type="submit" class="btn btn-danger">Удалить</button>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-05-06 17:47:25 +04:00
|
|
|
@else
|
|
|
|
<p>Учителя отсутствуют</p>
|
|
|
|
@endif
|
|
|
|
</div>
|
2024-05-07 12:14:18 +04:00
|
|
|
<div class="card-footer">
|
2024-05-06 17:47:25 +04:00
|
|
|
<a href="{{ route('teachers.create') }}" class="btn btn-success">Добавить</a>
|
2024-04-23 14:52:49 +04:00
|
|
|
</div>
|
|
|
|
<div class="card-footer">{{ $teachers->links() }}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|