Skip to content

Commit

Permalink
Fix method getMorphClass call on string (#1957)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson authored Sep 18, 2024
1 parent efe4bd2 commit 80d4b39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/admin/src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function get_search_builder($model, $search): Laravel\Scout\Builder|Builder

foreach (explode(' ', $search) as $searchWord) {
$query->where(function (Builder $query) use ($model, $searchWord) {
$attributes = Attribute::whereAttributeType($model->getMorphClass())
$attributes = Attribute::whereAttributeType($model::morphName())
->whereSearchable(true)
->get();

Expand Down

0 comments on commit 80d4b39

Please sign in to comment.