Skip to content

Clarification about team_id foreign key in permissions migration #46

@jcancig

Description

@jcancig

Hi! First of all, thank you for the great work on the Laravel Teams package — it’s really well designed and very helpful for team-based multi-tenant applications.

While reviewing the migration for the permissions table, I noticed that it includes a foreign key reference to the team model:

$table->foreignId(Config::get('teams.foreign_keys.team_id', 'team_id'))
->constrained()
->cascadeOnDelete();

However, this team_id column doesn’t seem to be used elsewhere in the package (for example, not in the Permission model or any relationships).

Could you please clarify the reasoning behind including this foreign key?

Was it meant to allow team-specific permission sets, or is it a leftover from an earlier design version?

Thanks again for your excellent work and for maintaining this package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions