Skip to content

Commit

Permalink
Merge pull request #155 from puzzledmonkey/1.2
Browse files Browse the repository at this point in the history
Update WithHeadingFinder.php to fix heading fields for lens exports
  • Loading branch information
patrickbrouwers authored Oct 26, 2023
2 parents a7fe3ad + b45b23e commit aab5fdd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Requests/WithHeadingFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ trait WithHeadingFinder
public function findHeading(string $attribute, string $default = null)
{
// In case attribute is used multiple times, grab last Field.
$field = $this
->newResource()
->indexFields($this)
$field = collect($this->resourceFields($this->newResource()))
->where('attribute', $attribute)
->last();

Expand Down

0 comments on commit aab5fdd

Please sign in to comment.