<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class PayrollItem extends Model {protected $guarded=[];protected function casts():array{return ['snapshot'=>'array','paid_at'=>'datetime'];}public function batch(){return $this->belongsTo(PayrollBatch::class,'payroll_batch_id');}public function employee(){return $this->belongsTo(Employee::class);}}