phpsa / filament-authentication

MIT License
106 stars 23 forks source link

Error on new user #50

Closed netbyte-nl closed 1 month ago

netbyte-nl commented 4 months ago

Getting this error when pressing the "new user" button in the user screen.

Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in C:\Websites\SDA2.0\SDA\vendor\filament\forms\src\Components\Select.php on line 773

When pressing "view" or "edit" in the user list this error comes: Call to a member function getResults() on null

PHP 8.3.2 10.43.0

phpsa commented 4 months ago

Investigating. thank you

mrhappyheart commented 4 months ago

same error :)

phpsa commented 4 months ago

Have you setup spatie roles and permissions traits in your user model?

netbyte-nl commented 4 months ago

Hi @phpsa, yes those are added:

image

phpsa commented 4 months ago

Based on the greyed out, looks like you have not put the use inside the class aswell?image

netbyte-nl commented 4 months ago

I managed to fix most issues with your suggestion above, many thanks for that! Only one issue remaining and thats when trying to view or edit a role:

image

yukebrillianth commented 2 months ago

I managed to fix most issues with your suggestion above, many thanks for that! Only one issue remaining and thats when trying to view or edit a role:

image

Same Issue

phpsa commented 2 months ago

For this issue, is there a repo i can look at - I am unable to replicate this issue.