mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-28 12:11:08 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			355 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			355 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| namespace Crater;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| use Crater\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);
 | |
|     }
 | |
| }
 |