Skip to content

Commit

Permalink
Merge pull request #364 from natanaelsinisalo/sanctum-tokens-morph-class
Browse files Browse the repository at this point in the history
Support custom polymorphic types in SanctumTokens getTableQuery
  • Loading branch information
jeffgreco13 authored Jun 9, 2024
2 parents a1b6439 + 463be45 commit ef4c791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Livewire/SanctumTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function getTableQuery(): Builder

return app(Sanctum::$personalAccessTokenModel)->where([
['tokenable_id', '=', $auth->id()],
['tokenable_type', '=', get_class($auth->user())],
['tokenable_type', '=', $auth->user()->getMorphClass()],
]);
}

Expand Down

0 comments on commit ef4c791

Please sign in to comment.