Dex
Dex
FFilament
Created by Dex on 2/21/2024 in #❓┊help
Override getTableKeyRecord function
Solved by importing the Illuminate\Database\Eloquent\Model class
3 replies
FFilament
Created by Dex on 1/9/2024 in #❓┊help
Tables rendering in print view
It's not a fillament problem, just needed to use the right css:
thead {
display: table-row-group;
}
thead {
display: table-row-group;
}
4 replies
FFilament
Created by Dex on 1/9/2024 in #❓┊help
Style customization print view
Solved through enabling background graphics in chromes print preview.
3 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
can you give me an example on that?
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
Yes it works as far but it is not a good option because it will work globally and I have no idea how to override filament functions
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
bump
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
bump
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
so one of the possibilities would be to patch that somehow and use syncWithoutDettach() instead of sync()
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
just found out that filament uses the sync method which will delete all records which aren't in the array
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
$this->saveRelationshipsUsing(static function (Select $component, Model $record, $state) {
if ($component->isMultiple()) {
$component->getRelationship()->sync($state ?? []);

return;
}

$component->getRelationship()->associate($state);
$record->save();
});
$this->saveRelationshipsUsing(static function (Select $component, Model $record, $state) {
if ($component->isMultiple()) {
$component->getRelationship()->sync($state ?? []);

return;
}

$component->getRelationship()->associate($state);
$record->save();
});
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
unfortunatelly none of both examples helped as far. I cant prevent deleting records from the pivot table when the relationship changes.
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
Can you provide some example?
23 replies
FFilament
Created by Dex on 8/23/2023 in #❓┊help
Updating rows of a belongsToMany relationship
A group can have one or multiple users, a user can be in one or more than one group and I would like to keep track of the updates like if a user isn't in a group anymore I want to know the date of exclusion as also the date the user entered the group @Patrick Boivin
23 replies