Files
app3/app/Models/Booking.php
2026-01-26 09:06:06 +00:00

35 lines
657 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 = [
'room_type_id',
'check_in',
'check_out',
'guest_name',
'guest_email',
'guest_phone',
'is_confirmed',
'total_price',
];
protected $casts = [
'check_in' => 'date',
'check_out' => 'date',
'is_confirmed' => 'boolean',
'total_price' => 'decimal:2',
];
public function roomType()
{
return $this->belongsTo(RoomType::class);
}
}