mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
24 lines
445 B
PHP
24 lines
445 B
PHP
<?php
|
|
namespace Crater\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Crater\Models\Invoice;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class InvoiceTemplate extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = ['path', 'view', 'name'];
|
|
|
|
public function invoices()
|
|
{
|
|
return $this->hasMany(Invoice::class);
|
|
}
|
|
|
|
public function getPathAttribute($value)
|
|
{
|
|
return url($value);
|
|
}
|
|
}
|