Always include the tasks with a schedule
This commit is contained in:
parent
1e0d630e1f
commit
cf7f36c950
2 changed files with 12 additions and 0 deletions
|
@ -40,6 +40,13 @@ class Schedule extends Validable
|
||||||
*/
|
*/
|
||||||
protected $table = 'schedules';
|
protected $table = 'schedules';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Always return the tasks associated with this schedule.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $with = ['tasks'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mass assignable attributes on this model.
|
* Mass assignable attributes on this model.
|
||||||
*
|
*
|
||||||
|
|
|
@ -13,6 +13,11 @@ class ScheduleTransformer extends BaseClientTransformer
|
||||||
*/
|
*/
|
||||||
protected $availableIncludes = ['tasks'];
|
protected $availableIncludes = ['tasks'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $defaultIncludes = ['tasks'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue