add more includes
This commit is contained in:
parent
614e630fde
commit
c1c5af8ed6
|
|
@ -20,9 +20,20 @@ class CommentSeeder extends Seeder
|
|||
|
||||
public function query(): Builder
|
||||
{
|
||||
$includes = ['discussion'];
|
||||
|
||||
if ($this->extensionEnabled('flarum-tags')) {
|
||||
$includes[] = 'discussion.tags';
|
||||
}
|
||||
|
||||
if ($this->extensionEnabled('fof-byobu')) {
|
||||
$includes[] = 'discussion.recipientUsers';
|
||||
$includes[] = 'discussion.recipientGroups';
|
||||
}
|
||||
|
||||
return CommentPost::query()
|
||||
->where('type', CommentPost::$type)
|
||||
->with('discussion');
|
||||
->with($includes);
|
||||
}
|
||||
|
||||
public static function savingOn(Dispatcher $events, callable $callable)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,18 @@ class DiscussionSeeder extends Seeder
|
|||
|
||||
public function query(): Builder
|
||||
{
|
||||
return Discussion::query();
|
||||
$includes = [];
|
||||
|
||||
if ($this->extensionEnabled('flarum-tags')) {
|
||||
$includes[] = 'tags';
|
||||
}
|
||||
|
||||
if ($this->extensionEnabled('fof-byobu')) {
|
||||
$includes[] = 'recipientUsers';
|
||||
$includes[] = 'recipientGroups';
|
||||
}
|
||||
return Discussion::query()
|
||||
->with($includes);
|
||||
}
|
||||
|
||||
public static function savingOn(Dispatcher $events, callable $callable)
|
||||
|
|
|
|||
Loading…
Reference in New Issue