Projects/3BIT/winter-semester/IIS/xnecasr00/app/Models/EventReservation.php
2026-04-14 19:28:46 +02:00

32 lines
604 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class EventReservation extends Model
{
protected $fillable = [
'event_id',
'user_id',
'number_of_guests',
'status',
];
/**
* Get the event for this reservation.
*/
public function event(): BelongsTo
{
return $this->belongsTo(Event::class);
}
/**
* Get the user who made this reservation.
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}