diff --git a/src/Requests/WithHeadingFinder.php b/src/Requests/WithHeadingFinder.php index 49f00b9..e8c64c8 100644 --- a/src/Requests/WithHeadingFinder.php +++ b/src/Requests/WithHeadingFinder.php @@ -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();