Always include the tasks with a schedule

This commit is contained in:
Dane Everitt
2020-03-22 13:57:31 -07:00
parent 1e0d630e1f
commit cf7f36c950
2 changed files with 12 additions and 0 deletions

View File

@@ -40,6 +40,13 @@ class Schedule extends Validable
*/
protected $table = 'schedules';
/**
* Always return the tasks associated with this schedule.
*
* @var array
*/
protected $with = ['tasks'];
/**
* Mass assignable attributes on this model.
*

View File

@@ -13,6 +13,11 @@ class ScheduleTransformer extends BaseClientTransformer
*/
protected $availableIncludes = ['tasks'];
/**
* @var array
*/
protected $defaultIncludes = ['tasks'];
/**
* {@inheritdoc}
*/