32 lines
604 B
PHP
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);
|
|
}
|
|
}
|