Adds an Entity Presenter to ExpenseCategory

Without the presentable trait and at the basic level a default
EntityPresenter, adding Expense Categories breaks when trying to view
the edit page for the expense.
This commit is contained in:
David Sivocha 2016-09-12 16:01:14 +01:00
parent 5888a287bc
commit 63ea0a00d4

View File

@ -1,6 +1,7 @@
<?php namespace App\Models; <?php namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Laracasts\Presenter\PresentableTrait;
/** /**
* Class ExpenseCategory * Class ExpenseCategory
@ -9,6 +10,7 @@ class ExpenseCategory extends EntityModel
{ {
// Expense Categories // Expense Categories
use SoftDeletes; use SoftDeletes;
use PresentableTrait;
/** /**
* @var array * @var array
@ -17,6 +19,11 @@ class ExpenseCategory extends EntityModel
'name', 'name',
]; ];
/**
* @var string
*/
protected $presenter = 'App\Ninja\Presenters\EntityPresenter';
/** /**
* @return mixed * @return mixed
*/ */