Skip to content

Updates signature - breaking change

Latest
Compare
Choose a tag to compare
@shanerbaner82 shanerbaner82 released this 10 Oct 00:36

You must now set a roleToAssign and restrictedRoles to the plugin:

use Shanerbaner82\PanelRoles\PanelRoles;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ... 
            ->plugin(PanelRoles::make()
                ->roleToAssign('developer')
                ->restrictedRoles(['admin', 'developer']),
            )
    }
}