Error "Field 'team_id' doesn't have a default value" when use select relationship function.
I used Filament V3 with Spatie Laravel Permission and used the TEAMS features as the team_id variable.
When I used
Select::make('roles')
->relationship('roles','name')
->preload(),
I got SQLSTATE[HY000]: General error: 1364 Field 'team_id' doesn't have a default value
Anyone issue same me, you help me, please?
1 Reply
aren't you supposed to have the Team model set before using the relationship?