Rahman Ramsi
Rahman Ramsi
FFilament
Created by Rahman Ramsi on 3/6/2024 in #❓┊help
Button loading animation too fast
No description
3 replies
FFilament
Created by Rahman Ramsi on 1/15/2024 in #❓┊help
How to create a dynamic table actions based on record ?
I try to create a dynamic actions in table, but in table actions method i can access the current record
10 replies
FFilament
Created by Rahman Ramsi on 11/22/2023 in #❓┊help
How to access parent record inside repeater field?
I have a Repeater with relationship inside Form, i want to validate the item inside repeater using unique validation, what i need is the id from parent, but i cant get that record. Here's the fields :
[
TextInput::make('name')
->required(),
Repeater::make('details')
->relationship()
->schema([
Grid::make()
->schema([
Select::make('category_id')
->relationship('category', 'name')
->unique(ignoreRecord: true, modifyRuleUsing: function(Unique $rule, Get $get, $record){
// $record result is the record from current item, not parent item
// I need a $parent to validate that this item is unique by parent_id, type_id, and category_id columns
return $rule->where('type_id', $get('type_id'))->where('parent_id', $parent->getKey());
})
->required(),
Select::make('type_id')
->relationship('type', 'name')
->required(),
TextInput::make('fee')
->numeric()
->required(),
]),
])
]
[
TextInput::make('name')
->required(),
Repeater::make('details')
->relationship()
->schema([
Grid::make()
->schema([
Select::make('category_id')
->relationship('category', 'name')
->unique(ignoreRecord: true, modifyRuleUsing: function(Unique $rule, Get $get, $record){
// $record result is the record from current item, not parent item
// I need a $parent to validate that this item is unique by parent_id, type_id, and category_id columns
return $rule->where('type_id', $get('type_id'))->where('parent_id', $parent->getKey());
})
->required(),
Select::make('type_id')
->relationship('type', 'name')
->required(),
TextInput::make('fee')
->numeric()
->required(),
]),
])
]
4 replies
FFilament
Created by Rahman Ramsi on 9/6/2023 in #❓┊help
Table using Orderable with Grouping is ordered weirdly
No description
3 replies
FFilament
Created by Rahman Ramsi on 9/4/2023 in #❓┊help
Is there a way to Group a table with morphToMany relationship?
No description
2 replies
FFilament
Created by Rahman Ramsi on 8/3/2023 in #❓┊help
Is there a way to align Tabs on infolist ?
6 replies