F
Filament10mo ago
mohamed

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
CappaS10mo ago
Can you share about 'UserType::class'?
mohamed
mohamedOP10mo ago
thats
No description
No description
CappaS
CappaS10mo ago
i think you error is in the ->options(), and don't use the ->enum()
CappaS
CappaS10mo ago
like this:
No description
Dennis Koch
Dennis Koch10mo ago
You shouldn't combine ->enum() and ->options(). One would overwrite the other. Also ->options() expects an array. Not an enum.
Blackpig
Blackpig10mo 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
mohamedOP10mo 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 Koch10mo ago
Read my message again
Also ->options() expects an array. Not an enum.
mohamed
mohamedOP10mo ago
hello how can i add telescope icon to user table thats icon not found
Dennis Koch
Dennis Koch10mo ago
That's a bit unrelated to the original topic, right?
mohamed
mohamedOP10mo 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 Koch10mo ago
Filament uses Heroicons. But you can install other Blade UI Icon sets.
mohamed
mohamedOP10mo 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
mohamedOP10mo ago
?
Tieme
Tieme10mo 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.
Want results from more Discord servers?
Add your server