pratik
pratik
FFilament
Created by pratik on 6/25/2024 in #❓┊help
Select Input in KeyValue Field ?
Is it possible to have select Field in keyValue's key ? And is it possible to make repeater one-dimensional ?
1 replies
FFilament
Created by pratik on 11/3/2023 in #❓┊help
How to render json column data in table TextColumn
I have call_email json field that holds the data inserted using repeater and array casted in the model :
[{"email": "[email protected]", "phone": "+8798998786xx"}] How to show this data in TextColumn ?
7 replies
FFilament
Created by pratik on 11/1/2023 in #❓┊help
Gallery with Multiple Images and multiple image upload
what would be the best way to upload multiple images at once to the gallery, gallery can have any number of images and the client requires the he should be able to upload multiple images at the same time ? should I use multiple file upload of default fileUpload or Spatie Medialibrary, wouldn't it lag if there's lots of images ?
1 replies
FFilament
Created by pratik on 9/25/2023 in #❓┊help
createOptionForm without relationship
I am stuck in this scenario, I have source model that has possible sources, when user is registering the user can select the existing source or create a new one. But as far as I know to use createOptionForm you need to bind it to the relationship. And the problem is since there is no user instance to call relationship on, it's not working. Is there any way to use createOptionForm for Model and not relationship ?
6 replies
FFilament
Created by pratik on 8/10/2023 in #❓┊help
Tenant password reset token is being stored on landlord password_reset_tokens table.
I am using spatie's multitenancy [multi database setup] with filamentphp v3 with AdminPanel and TenantPanel, At the end of configuring and testing password resets I noticed that : for the password reset requested from tenant panel is being stored to landlord database's password_reset_tokens table, while the reset works just fine. I wonder what is causing this behavior ! , Everything works fine despite the tenant password resets being stored on landlord's table. The password reset mail just works with the tenant subdomain and the password reset is successfull but I find this behavior weird. I need some guidance. I am using different password brokers for landlord and tenant :
'providers' => [
'landlords' => [
'driver' => 'eloquent',
'model' => App\Models\Landlord\User::class,
],

'tenants' => [
'driver' => 'eloquent',
'model' => App\Models\Tenant\User::class,
],
],
'passwords' => [
'landlords' => [
'provider' => 'landlords',
'table' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
'tenants' => [
'provider' => 'tenants',
'table' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
],
'providers' => [
'landlords' => [
'driver' => 'eloquent',
'model' => App\Models\Landlord\User::class,
],

'tenants' => [
'driver' => 'eloquent',
'model' => App\Models\Tenant\User::class,
],
],
'passwords' => [
'landlords' => [
'provider' => 'landlords',
'table' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
'tenants' => [
'provider' => 'tenants',
'table' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
],
landlord password resets works too. Everything is working as expected.
2 replies
FFilament
Created by pratik on 7/5/2023 in #❓┊help
How to disable every other dates except one date in datepicker ?
I want to disable all the dates in datepicker input field except one date by setting it as default, how can i achieve this functionality ? default doesn't seem to be working. Forms\Components\DatePicker::make('from') ->default(fn ($get) =>($get('min_date'))) ->hidden(fn ($get) => (int) $get('farmer_id') == NULL) ->required(),
10 replies
FFilament
Created by pratik on 5/1/2023 in #❓┊help
Key value column implementation for settings table
I have settings table with two columns key and value . I want a setting resource to set multiple keys and have users input values for value field of respective keys. Each key value is an individual record in the table. How to achieve this with settingResource, what fields to use ?
4 replies