27 lines
484 B
PHP
27 lines
484 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Invoice\Models;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||
|
|
||
|
class Invoice extends Model
|
||
|
{
|
||
|
use HasFactory;
|
||
|
|
||
|
public $guarded = [];
|
||
|
|
||
|
public $casts = [
|
||
|
'to' => 'json',
|
||
|
];
|
||
|
|
||
|
/**
|
||
|
* @return HasMany<InvoicePosition>
|
||
|
*/
|
||
|
public function positions(): HasMany
|
||
|
{
|
||
|
return $this->hasMany(InvoicePosition::class);
|
||
|
}
|
||
|
}
|