skip to Main Content

Laravel – FilamentPHP Select input editing

Heyya, I am working on Select FormsComponentsSelect::make('roles')->options(function (){ $roles = Role::pluck('name'); $filtered_roles = $roles->filter(fn($role)=>$role!='super_admin'); return $filtered_roles; })->searchable()->preload()->multiple() Works great. However on the edit page it doesnt show already defined roles for specific user. Each time it show select one of…

VIEW QUESTION

Laravel – Put a modal form in middle of the form in filament v3

How can I make 'price' to be recognized as a member of the form? public static function form(Form $form): Form { return $form ->schema([ Wizard::make([ WizardStep::make('First Step') ->schema([ TextInput::make('title')->required(), FormsComponentsActions::make([ Action::make('Custom Modal') ->button() ->form([ TextInput::make('price')->prefix('$')->required(), ]) ]), WizardStep::make('Second Step') ->schema([…

VIEW QUESTION

Laravel Policy to limit Filament Bulk Delete

In my Laravel project, I try to limit delete action. Non-admin users should be able to delete only their own content. public function forceDelete(User $user, Slider $slider): bool { return $user->hasRole("Admin") || $slider->created_by === $user->id; } I can still see…

VIEW QUESTION
Back To Top
Search