Closed spriggsey closed 4 years ago
Currently the relationship of the Team model is using the incorrect join.
Team
The owner() relationship on the Team model should be a belongsTo() relationship as the Team model has the owner_id column.
owner()
belongsTo()
owner_id
The original code does work but with implementation of Laravel Nova it becomes an issue as they require a BelongsTo join to properly function.
BelongsTo
https://github.com/mpociot/teamwork/blob/4de34f53c44757030ed54dde5f69fe48b7a207e1/src/Mpociot/Teamwork/Traits/TeamworkTeamTrait.php#L35-L46
This should be fixed now.
Currently the relationship of the
Team
model is using the incorrect join.The
owner()
relationship on theTeam
model should be abelongsTo()
relationship as theTeam
model has theowner_id
column.The original code does work but with implementation of Laravel Nova it becomes an issue as they require a
BelongsTo
join to properly function.https://github.com/mpociot/teamwork/blob/4de34f53c44757030ed54dde5f69fe48b7a207e1/src/Mpociot/Teamwork/Traits/TeamworkTeamTrait.php#L35-L46