Skip to content

How to get owns and check is owned #648

@bilginnet

Description

@bilginnet

In laravel 11 I am assigning ownership to an organization like below.

$organization = Organization::create(['name' => 'Test Org']);
Bouncer::allow($user)->toOwn($organization);

Question 1: How can I see which organizations I have ownership rights after logging in.
Ex: $user->owns()

Question 2: How do I check if the user has ownership rights on any organization after login?
Ex: $user->isOwnedFor($organization)

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