1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00
invoiceninja/app/Models/TaxRate.php
David Bomba af9ae06289
Model encode primary keys (#2510)
* Client Address

* Vue components for address

* Fix for null objects being passed to Vue

* Copy Billing Address

* route key

* Social auth

* Pad out route bindings

* Deploy hashes across models

* social auth buttons
2018-11-20 15:36:56 +11:00

29 lines
435 B
PHP

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