1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Models/Expense.php

28 lines
434 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use App\Utils\Traits\MakesHash;
use Illuminate\Database\Eloquent\Model;
class Expense extends BaseModel
{
use MakesHash;
protected $guarded = [
'id',
];
protected $appends = ['expense_id'];
public function getRouteKeyName()
{
return 'expense_id';
}
public function getExpenseIdAttribute()
{
return $this->encodePrimaryKey($this->id);
}
}