mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-31 05:31:10 -04:00 
			
		
		
		
	build version 400
This commit is contained in:
		
							
								
								
									
										23
									
								
								app/Models/InvoiceTemplate.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								app/Models/InvoiceTemplate.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| <?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); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user