Skip to content
Discussion options

You must be logged in to vote

use $panel->getId()

public function canAccessPanel(Panel $panel): bool
{
    return match($panel->getId()) {
        default => false,
        'admin' => str_ends_with($this->email, '@example.com'),
    };
}

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@micraux
Comment options

@bilogic
Comment options

@danharrin
Comment options

@bilogic
Comment options

@Asheshanghab
Comment options

Answer selected by Ssionn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
7 participants