mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 16:37:31 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			738 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			738 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\SoftDeletes;
 | |
| 
 | |
| /**
 | |
|  * Class ExpenseCategory
 | |
|  */
 | |
| class ExpenseCategory extends EntityModel
 | |
| {
 | |
|     // Expense Categories
 | |
|     use SoftDeletes;
 | |
| 
 | |
|     /**
 | |
|      * @var array
 | |
|      */
 | |
|     protected $fillable = [
 | |
|         'name',
 | |
|     ];
 | |
| 
 | |
|     /**
 | |
|      * @return mixed
 | |
|      */
 | |
|     public function getEntityType()
 | |
|     {
 | |
|         return ENTITY_EXPENSE_CATEGORY;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
 | |
|      */
 | |
|     public function expense()
 | |
|     {
 | |
|         return $this->belongsTo('App\Models\Expense');
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @return string
 | |
|      */
 | |
|     public function getRoute()
 | |
|     {
 | |
|         return "/expense_categories/{$this->public_id}/edit";
 | |
|     }
 | |
| 
 | |
| }
 |