<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Holiday extends Model
{
    protected $fillable = ['date', 'description'];
    protected $casts = ['date' => 'date'];

    public static function isHoliday($date)
    {
        return self::whereDate('date', $date)->exists(); // cek apakah suatu tanggal adalah libur
    }
}