mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-29 20:51:09 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			448 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			448 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| namespace Crater\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| use Crater\Models\Estimate;
 | |
| use Illuminate\Database\Eloquent\Factories\HasFactory;
 | |
| 
 | |
| class EstimateTemplate extends Model
 | |
| {
 | |
|     use HasFactory;
 | |
|     protected $fillable = ['path', 'view', 'name'];
 | |
| 
 | |
|     public function estimates()
 | |
|     {
 | |
|         return $this->hasMany(Estimate::class);
 | |
|     }
 | |
| 
 | |
|     public function getPathAttribute($value)
 | |
|     {
 | |
|         return url($value);
 | |
|     }
 | |
| }
 |