atcheck/resources/views/admin/admin_rooms.blade.php

39 lines
1.5 KiB
PHP
Raw Normal View History

@extends('layouts.adminpanel')
@section('title') Admin Panel - Rooms @endsection
@section('admin_content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
@if ($rooms->count() > 0)
<h5> All rooms: ({{ $rooms->count() }}) </h5>
<table>
<tr>
<th>ID</th>
<th> Name </th>
<th> Capacity </th>
<th> Arrangement </th>
<th> Creation date </th>
</tr>
@foreach ($rooms as $room)
<tr>
<td> {{ $room->id }}</td>
<td> {{ $room->name }} </td>
<td> {{ $room->capacity }} </td>
<td> {{ $room->arrangement}}</td>
<td> {{ $room->room_id}}</td>
<td>
<a href="{{ route('admin_delete_room', ['room_id' => $room->id]) }}" name="delete-room-btn"> Delete </a>
</td>
</tr>
@endforeach
</table>
@else
<p> No rooms yet. </p>
@endif
</div>
</div>
</div>
@endsection