Skip to content

Commit

Permalink
Fix lazy load on connections
Browse files Browse the repository at this point in the history
  • Loading branch information
ilestis committed Dec 8, 2023
1 parent 9db6d9a commit d562ccf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/Http/Controllers/Entity/RelationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function index(Campaign $campaign, Entity $entity)
$rows = $entity
->allRelationships()
->sort(request()->only(['o', 'k']))
->with(['owner', 'target', 'target.location', 'target.location.entity'])
->paginate()
->withPath(route('entities.relations_table', ['campaign' => $campaign, 'entity' => $entity, 'mode' => 'table']));

Expand Down
2 changes: 1 addition & 1 deletion app/Services/Entity/ConnectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public function connections()
// Prepare ids for pagination
$this->prepareIds();


return Entity::whereIn('id', $this->ids)
->with('image')
->orderBy($this->order)
->paginate();
}
Expand Down

0 comments on commit d562ccf

Please sign in to comment.