Initial commit
This commit is contained in:
commit
c909d539bc
7178 files changed
+756624
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user