Fix flight page errors and some naming fixes
This commit is contained in:
27
app/Models/Traits/ExpensableTrait.php
Normal file
27
app/Models/Traits/ExpensableTrait.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Traits;
|
||||
|
||||
use App\Models\Expense;
|
||||
|
||||
trait ExpensableTrait
|
||||
{
|
||||
public static function bootExpensable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Morph to Expenses.
|
||||
* @return mixed
|
||||
*/
|
||||
public function expenses()
|
||||
{
|
||||
return $this->morphMany(
|
||||
Expense::class,
|
||||
'expenses', # overridden by the next two anyway
|
||||
'ref_class',
|
||||
'ref_class_id'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user