mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
init crater
This commit is contained in:
20
app/InvoiceTemplate.php
Normal file
20
app/InvoiceTemplate.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace Laraspace;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Laraspace\Invoice;
|
||||
|
||||
class InvoiceTemplate extends Model
|
||||
{
|
||||
protected $fillable = ['path', 'view', 'name'];
|
||||
|
||||
public function invoices()
|
||||
{
|
||||
return $this->hasMany(Invoice::class);
|
||||
}
|
||||
|
||||
public function getPathAttribute($value)
|
||||
{
|
||||
return url($value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user