<?php

// app/Models/Expense.php
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Expense extends Model {
    use HasFactory;
    protected $fillable = ['expense_head_id', 'details', 'amount', 'paid_by', 'date'];

    public function head() {
        return $this->belongsTo(ExpenseHead::class, 'expense_head_id');
    }
}
