This repository has been archived on 2026-09-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2026-01-14 00:54:08 +00:00

36 lines
724 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Invoice extends Model
{
protected $fillable = [
'student_id',
'period_start',
'period_end',
'total',
'status',
'pdf_path',
];
/**
* The student this invoice is for.
*/
public function student(): BelongsTo
{
return $this->belongsTo(StudentProfile::class, 'student_id');
}
/**
* All invoice line items associated with this invoice.
*/
public function items(): HasMany
{
return $this->hasMany(InvoiceItem::class);
}
}