ChrisB
ChrisB
FFilament
Created by ChrisB on 3/18/2024 in #❓┊help
RelationManager afterSave() Question
Insert data into another table + call a web hook via Spatie. Both of these actions I have running on non-relationship resources already.
6 replies
FFilament
Created by ChrisB on 3/18/2024 in #❓┊help
RelationManager afterSave() Question
I'm not sure if I'm being too specific with this question so here it is another way... I need to add an action when a RelationManager page field is updated. What's the best way of doing this? afterSave doesn't work, like it does in the usual Edit resource pages.
6 replies
FFilament
Created by ChrisB on 2/8/2024 in #❓┊help
Contents of a Select using SQL type query
Bingo!
->options(function (Forms\Get $get): Collection {
return UserPermissions::where('system_link', $get('system_id'))->pluck('permission_name', 'id');
->options(function (Forms\Get $get): Collection {
return UserPermissions::where('system_link', $get('system_id'))->pluck('permission_name', 'id');
5 replies
FFilament
Created by ChrisB on 12/28/2023 in #❓┊help
Multiple Actions on Save
Nice! Thank you. Sorry, I missed the resources link in your first message, which would have detailed everything for me. Working perfectly.... Thanks again.
7 replies
FFilament
Created by ChrisB on 12/28/2023 in #❓┊help
Multiple Actions on Save
Totally overlooked / misunderstood that, thank you! I've quickly tried the below, with no luck... Am I putting this in the right place within the action?
protected function getFormActions(): array
{
return [
$this->getSaveFormAction()
->label('Save and Trigger')
->after(function (MyModel $new) {
$result = $new->customFunction('Some Data');
}),
$this->getCancelFormAction()
];
}
protected function getFormActions(): array
{
return [
$this->getSaveFormAction()
->label('Save and Trigger')
->after(function (MyModel $new) {
$result = $new->customFunction('Some Data');
}),
$this->getCancelFormAction()
];
}
7 replies