<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class LeaveRequest extends Model {protected $guarded=[];protected function casts():array{return ['start_date'=>'date','end_date'=>'date','reviewed_at'=>'datetime'];}public function user(){return $this->belongsTo(User::class);}public function type(){return $this->belongsTo(LeaveType::class,'leave_type_id');}public function approvalSteps(){return $this->morphMany(ApprovalStep::class,'approvable');}}