| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/clients/client2/web30/web/app/Controllers/ |
Upload File : |
<?php
declare(strict_types=1);
namespace App\Controllers;
use App\Models\Booking;
final class BookingController extends Controller
{
public function index(): void
{
$this->view('bookings/index');
}
public function checkin(): void
{
$this->view('checkin/index');
}
public function show(): void
{
$id = (int) ($_GET['id'] ?? 0);
$booking = (new Booking())->getWithRelations($id);
if (!$booking) {
redirect('/bookings');
}
$this->view('bookings/show', ['booking' => $booking]);
}
public function edit(): void
{
$id = (int) ($_GET['id'] ?? 0);
$booking = (new Booking())->find($id);
if (!$booking) {
redirect('/bookings');
}
$this->view('bookings/edit', ['booking' => $booking]);
}
}