hotel
This commit is contained in:
0
resources/views/admin/hotels/create.blade.php
Normal file
0
resources/views/admin/hotels/create.blade.php
Normal file
0
resources/views/admin/hotels/edit.blade.php
Normal file
0
resources/views/admin/hotels/edit.blade.php
Normal file
45
resources/views/admin/hotels/index.blade.php
Normal file
45
resources/views/admin/hotels/index.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('content')
|
||||
<div>
|
||||
<h1>Отели</h1>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="success">
|
||||
{{ session('success') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<a href="{{ route('admin.hotels.create') }}" class="btn">Добавить отель</a>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Название</th>
|
||||
<th>Адрес</th>
|
||||
<th>Телефон</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($hotels as $hotel)
|
||||
<tr>
|
||||
<td>{{ $hotel->name }}</td>
|
||||
<td>{{ $hotel->address ?? '-' }}</td>
|
||||
<td>{{ $hotel->phone ?? '-' }}</td>
|
||||
<td>
|
||||
<a href="{{ route('admin.hotels.edit', $hotel) }}" class="btn" style="background: #666;">Редактировать</a>
|
||||
<form action="{{ route('admin.hotels.destroy', $hotel) }}" method="POST" style="display: inline;">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn" style="background: #aaa;" onclick="return confirm('Удалить отель?')">
|
||||
Удалить
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user