Alex'R
Alex'R
FFilament
Created by Alex'R on 2/19/2025 in #❓┊help
Redirect to the same resource after selecting a Tenant
Hi, Although I searched the documentation, I couldn't find anything allowing a user to be redirected to the same type of resource when they select a tenant in their lite. Is this possible? Thanks to you
12 replies
FFilament
Created by Alex'R on 2/13/2025 in #❓┊help
Edit RelationManager pivot array data
Hi, I'm trying to create a form to update my pivot table data for a resale system. I have, in my Model Service, my relationship which includes the pivots:
public function providers(): BelongsToMany
{
return $this->belongsToMany(Provider::class, 'provider_services')
->using(ProviderServicePivot::class)
->withPivot('extra', 'is_enabled')
->withTimestamps();
}
public function providers(): BelongsToMany
{
return $this->belongsToMany(Provider::class, 'provider_services')
->using(ProviderServicePivot::class)
->withPivot('extra', 'is_enabled')
->withTimestamps();
}
And this is my ProviderServicePivot :
class ProviderServicePivot extends Pivot
{
public function casts(): array
{
return [
'extra' => 'array',
'is_enabled' => 'boolean',
];
}
}
class ProviderServicePivot extends Pivot
{
public function casts(): array
{
return [
'extra' => 'array',
'is_enabled' => 'boolean',
];
}
}
And on my form when i Try to access on extra.name property, it doesn't work.
public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Section::make(__('inputs.sections.infos'))
->columns(2)
->schema([
Forms\Components\TextInput::make('extra.name')
->label(__('inputs.generic.name'))
->maxLength(255)
->required()
]),
]);
}
public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Section::make(__('inputs.sections.infos'))
->columns(2)
->schema([
Forms\Components\TextInput::make('extra.name')
->label(__('inputs.generic.name'))
->maxLength(255)
->required()
]),
]);
}
Anyone have an idea of ​​the method to follow? Thank you so much,
4 replies