schwartzmj
schwartzmj
Explore posts from servers
FFilament
Created by schwartzmj on 4/25/2024 in #❓┊help
Subdomain / Domain based routing w/ Multitenancy. 419 Page Expired
or, i guess, rethink my app requirements and simplify it. dont allow a user to belong to multiple tenants etc 🤷‍♂️ . seems like i dont have a good enough grasp on the moving pieces here
12 replies
FFilament
Created by schwartzmj on 4/25/2024 in #❓┊help
Subdomain / Domain based routing w/ Multitenancy. 419 Page Expired
between these session issues, spatie's package and filament
12 replies
FFilament
Created by schwartzmj on 4/25/2024 in #❓┊help
Subdomain / Domain based routing w/ Multitenancy. 419 Page Expired
whole thing is quite confusing, might just have to ignore the filament tenancy stuff and handle it with policies or whatever
12 replies
FFilament
Created by schwartzmj on 4/25/2024 in #❓┊help
Subdomain / Domain based routing w/ Multitenancy. 419 Page Expired
nah, single-db multi-tenancy
12 replies
FFilament
Created by schwartzmj on 4/25/2024 in #❓┊help
Subdomain / Domain based routing w/ Multitenancy. 419 Page Expired
im actually getting a bit confused here. SESSION_DRIVER set to file seems to work now? (instead of database) i do get odd issues though like trying to login at the root domain is successful but then redirects you to the default tenant where you have to login again
12 replies
FFilament
Created by schwartzmj on 4/25/2024 in #❓┊help
Subdomain / Domain based routing w/ Multitenancy. 419 Page Expired
It seems this is caused by the isPersistent: true configuration option for admin panel middleware
12 replies
FFilament
Created by schwartzmj on 4/2/2024 in #❓┊help
Media Picker field type
e.g. something similar to if you were to select or upload an image with wordpress media gallery
5 replies
FFilament
Created by schwartzmj on 2/19/2024 in #❓┊help
Refresh parent on relationship manager update
Unsure if I did something wrong, but this didn't work. In any case, I added the listeners property to my page to $refresh on an event, dispatched that event and that seems to work
6 replies
FFilament
Created by schwartzmj on 2/19/2024 in #❓┊help
Refresh parent on relationship manager update
I suppose this is a Livewire feature
6 replies
FFilament
Created by schwartzmj on 2/19/2024 in #❓┊help
Refresh parent on relationship manager update
Thank you I'll give this a shot. Did I miss this in the docs somewhere?
6 replies
FFilament
Created by schwartzmj on 2/15/2024 in #❓┊help
Reordering repeater items
Thank you!
12 replies
FFilament
Created by schwartzmj on 2/15/2024 in #❓┊help
Reordering repeater items
Long day
12 replies
FFilament
Created by schwartzmj on 2/15/2024 in #❓┊help
Reordering repeater items
Just figured this out 🤦‍♂️
12 replies
FFilament
Created by schwartzmj on 2/15/2024 in #❓┊help
Reordering repeater items
return $form
->schema([
TextInput::make('name')
->required()
->maxLength(255),
Repeater::make('values')
->columnSpanFull()
->columns(2)
->relationship()
->schema([
TextInput::make('value')
->required()
->maxLength(255),
TextInput::make('price_modifier')
->numeric()
])
->orderColumn('sort_order'),
]);
return $form
->schema([
TextInput::make('name')
->required()
->maxLength(255),
Repeater::make('values')
->columnSpanFull()
->columns(2)
->relationship()
->schema([
TextInput::make('value')
->required()
->maxLength(255),
TextInput::make('price_modifier')
->numeric()
])
->orderColumn('sort_order'),
]);
12 replies
FFilament
Created by schwartzmj on 2/15/2024 in #❓┊help
Reordering repeater items
except it doesn't work...?
12 replies
FFilament
Created by schwartzmj on 2/15/2024 in #❓┊help
Reordering repeater items
Swear I CMD+F'd and searched multiple times
12 replies
FFilament
Created by schwartzmj on 2/15/2024 in #❓┊help
Reordering repeater items
Of course after looking for a while then posting this question, I find it immediately: https://filamentphp.com/docs/3.x/forms/fields/repeater#reordering-items-in-a-relationship
12 replies
FFilament
Created by schwartzmj on 2/6/2024 in #❓┊help
Pre-populating form and saving to pivot
Forms\Components\Repeater::make('selectedOptions')
->relationship('selectedOptions')
->schema(
...$this->getOwnerRecord()->productOptions()->get()->map(function ($productOption) {
return [
Forms\Components\Select::make('product_option_value_id')
->relationship('productOptionValue', 'value')
->options($productOption->productOptionValues->pluck('value', 'id')->toArray())
->label($productOption->name)
->required(),
Forms\Components\Select::make('product_option_id')
->relationship('productOption', 'name')
->options([$productOption->id => $productOption->name])
->default($productOption->id),
Forms\Components\TextInput::make('product_option_id')
->default($productOption->id)
];
})->toArray()
)
Forms\Components\Repeater::make('selectedOptions')
->relationship('selectedOptions')
->schema(
...$this->getOwnerRecord()->productOptions()->get()->map(function ($productOption) {
return [
Forms\Components\Select::make('product_option_value_id')
->relationship('productOptionValue', 'value')
->options($productOption->productOptionValues->pluck('value', 'id')->toArray())
->label($productOption->name)
->required(),
Forms\Components\Select::make('product_option_id')
->relationship('productOption', 'name')
->options([$productOption->id => $productOption->name])
->default($productOption->id),
Forms\Components\TextInput::make('product_option_id')
->default($productOption->id)
];
})->toArray()
)
My example is a bit messy but I'm throwing things at the wall here to see what sticks. Hoping somebody can help point me in the right direction.
2 replies
FFilament
Created by schwartzmj on 1/27/2024 in #❓┊help
Confirmation on my approach for nested resources
I want to be able to click "Edit" and instead of a modal it goes to /admin/fundraisers/6/products/2/edit, for example
3 replies
FFilament
Created by schwartzmj on 1/27/2024 in #❓┊help
Confirmation on my approach for nested resources
No description
3 replies