1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00
invoiceninja/app/Models/ExpenseCategory.php

45 lines
738 B
PHP
Raw Normal View History

2016-06-11 04:47:26 +02:00
<?php namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class ExpenseCategory
*/
2016-06-11 04:47:26 +02:00
class ExpenseCategory extends EntityModel
{
// Expense Categories
use SoftDeletes;
/**
* @var array
*/
2016-06-11 04:47:26 +02:00
protected $fillable = [
'name',
];
2016-07-06 20:35:16 +02:00
/**
* @return mixed
*/
public function getEntityType()
{
return ENTITY_EXPENSE_CATEGORY;
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
2016-06-11 04:47:26 +02:00
public function expense()
{
return $this->belongsTo('App\Models\Expense');
}
2016-07-06 20:35:16 +02:00
/**
* @return string
*/
public function getRoute()
{
return "/expense_categories/{$this->public_id}/edit";
}
2016-07-05 20:49:47 +02:00
}