Remove subfleet_expenses and combine into main expenses table; select expense type on subfleet #130 #136
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits;
|
||||
|
||||
use App\Models\Expense;
|
||||
|
||||
trait ExpensableTrait
|
||||
{
|
||||
|
||||
/**
|
||||
* Initialize a new journal when a new record is created
|
||||
*/
|
||||
public static function bootExpensableTrait()
|
||||
{
|
||||
/*static::created(function ($model) {
|
||||
$model->initJournal(config('phpvms.currency'));
|
||||
});*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Morph to Expenses.
|
||||
* @return mixed
|
||||
*/
|
||||
public function expenses()
|
||||
{
|
||||
return $this->morphToMany(Expense::class, 'expensable');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user