prnl.
login error
Looking at the Filament\Pages\Auth\EditProfile there are some examples of setting the password, check the dehydrateStateUsing option.
protected function getPasswordFormComponent(): Component
{
return TextInput::make('password')
->label(('filament-panels::pages/auth/edit-profile.form.password.label'))
->password()
->revealable(filament()->arePasswordsRevealable())
->rule(Password::default())
->autocomplete('new-password')
->dehydrated(fn ($state): bool => filled($state))
->dehydrateStateUsing(fn ($state): string => Hash::make($state))
->live(debounce: 500)
->same('passwordConfirmation');
}
protected function getPasswordConfirmationFormComponent(): Component
{
return TextInput::make('passwordConfirmation')
->label(('filament-panels::pages/auth/edit-profile.form.password_confirmation.label'))
->password()
->revealable(filament()->arePasswordsRevealable())
->required()
->visible(fn (Get $get): bool => filled($get('password')))
->dehydrated(false);
}
15 replies
login error
I got the same error, when I look into my database the password is stored as plaintext instead of encrypted. I also have Nova running on the same project (transitioning to Filament), creating users from Nova work fine.
My Filament User resource is a "simple" resource.
15 replies
Export a resource model with a HasMany relation
Additionally you'll also have to overwrite/extend the PrepareCsvExport class and change the following code
into
Than add the ->job() to your export, see https://filamentphp.com/docs/3.x/actions/prebuilt-actions/export#customizing-the-export-job
7 replies
Export a resource model with a HasMany relation
Found the solution, for anyone else looking to export a HasMany, below you'll find an example of the modifyQuery method.
1) Changed the $model to the LineItem model.
2) Write your query in the modifyQuery method.
7 replies
Export a resource model with a HasMany relation
I'm looking for the same export functionality, would be nice to be able to export the OrderItems along with the Orders. Either in one sheet or in one CSV or 1 xlsx with 2 sheets, one sheet for the Orders and one sheet for the OrderItems.
I've tried various possible solutions with "modifyQuery", the best result I got is one record for an Order and the OrderLine.columns were comma separated into a single column.
@kool maybe change the word HadsMany to HasMany in the subject, so people can better find this question.
7 replies
select 'default' not working in filter action/forms
I just ran into the same problem, Filament keeps track of the latest selected value inside a session/cookie called Dashboard_filters, after a refresh it will use that value to set the default. Try removing your cookies and see what default value is used, most likely it will use April 🤞
13 replies