1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00
invoiceninja/app/Models/Product.php
2015-10-21 14:11:08 +03:00

20 lines
419 B
PHP

<?php namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
class Product extends EntityModel
{
use SoftDeletes;
protected $dates = ['deleted_at'];
public static function findProductByKey($key)
{
return Product::scope()->where('product_key', '=', $key)->first();
}
public function default_tax_rate()
{
return $this->belongsTo('App\Models\TaxRate');
}
}