edit

i have error thats at edit page the use type select not appear at edit thats my code Forms\Components\Select::make('user_type') ->enum(UserType::class) ->options(UserType::class) ->required() ->label('User UserType') ->placeholder('Select a user type'),
16 Replies
CappaS
CappaS5mo ago
Can you share about 'UserType::class'?
mohamed
mohamed5mo ago
thats
No description
No description
CappaS
CappaS5mo ago
i think you error is in the ->options(), and don't use the ->enum()
CappaS
CappaS5mo ago
like this:
No description
Dennis Koch
Dennis Koch5mo ago
You shouldn't combine ->enum() and ->options(). One would overwrite the other. Also ->options() expects an array. Not an enum.
Blackpig
Blackpig5mo ago
You can use an Enum for the Options (https://filamentphp.com/docs/3.x/support/enums#using-the-enum-label-with-form-field-options) but make sure you implement the HasLabel interface (see docs above)
mohamed
mohamed5mo ago
Forms\Components\Select::make('type') ->options(User::TYPES) ->required() ->label('User Type') ->placeholder('Select a user type'), i make this to get thats concepts of options constant
Dennis Koch
Dennis Koch5mo ago
Read my message again
Also ->options() expects an array. Not an enum.
mohamed
mohamed5mo ago
hello how can i add telescope icon to user table thats icon not found
Dennis Koch
Dennis Koch5mo ago
That's a bit unrelated to the original topic, right?
mohamed
mohamed5mo ago
nope in filament table i make a link away for user telecope i need to make it with icon telescope can i use <x-fas-stethoscope />
Dennis Koch
Dennis Koch5mo ago
Filament uses Heroicons. But you can install other Blade UI Icon sets.
mohamed
mohamed5mo ago
GitHub
GitHub - VentureCraft/revisionable: Easily create a revision histor...
Easily create a revision history for any laravel model - GitHub - VentureCraft/revisionable: Easily create a revision history for any laravel model
mohamed
mohamed5mo ago
?
Tieme
Tieme5mo ago
Take a look at the plugin section : https://filamentphp.com/plugins?search=rev
Filament
Plugins - Filament
Community made packages for Filament projects, which give you access to awesome new features.