init crater

This commit is contained in:
Mohit Panjwani
2019-11-11 12:16:00 +05:30
commit bdf2ba51d6
668 changed files with 158503 additions and 0 deletions

31
app/TaxType.php Normal file
View File

@ -0,0 +1,31 @@
<?php
namespace Laraspace;
use Illuminate\Database\Eloquent\Model;
use Laraspace\Tax;
class TaxType extends Model
{
protected $fillable = [
'name',
'percent',
'company_id',
'compound_tax',
'collective_tax',
'description'
];
protected $casts = [
'percent' => 'float'
];
public function taxes()
{
return $this->hasMany(Tax::class);
}
public function scopeWhereCompany($query, $company_id)
{
$query->where('company_id', $company_id);
}
}