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