© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
3 replies
bouly

How to scope filament-shield roles

Hello,

I'm wondering how to scope the roles of bezhanSalleh/filament-shield so that the Admin role can only be selected by admins.

Here is my current code:

Select::make('roles')
  ->label(__('Role'))
  ->relationship('roles', 'name')
  ->preload()
  ->required()
  ->searchable(),
Select::make('roles')
  ->label(__('Role'))
  ->relationship('roles', 'name')
  ->preload()
  ->required()
  ->searchable(),


Thanks!
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Filament shield showing Roles managment to everyone
FilamentFFilament / ❓┊help
2y ago
Vanilla Spatie roles or filament shield
FilamentFFilament / ❓┊help
2y ago
Filament-Shield Error Showing Two Roles Resource
FilamentFFilament / ❓┊help
14mo ago