MIF_E31222882/app/Models/Booking.php

24 lines
440 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Booking extends Model
{
use HasFactory;
protected $fillable = ['table_id', 'user_id', 'start_time', 'end_time', 'status'];
public function table()
{
return $this->belongsTo(Table::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}