Tim
Tim
FFilament
Created by Tim on 1/17/2024 in #❓┊help
Inline Summaries
so my totalPoints funciton in the Army model does the calculations. the function within the state call is a callback with acess to the resource record. You can then do whatever calucaltions you want like
TextColumn:make('total_tax')->state(function(Order $order) {
return $numebr1 + $number2 + $number3;
});
TextColumn:make('total_tax')->state(function(Order $order) {
return $numebr1 + $number2 + $number3;
});
5 replies
FFilament
Created by Tim on 1/17/2024 in #❓┊help
Inline Summaries
Answered my own question, sorry for the post.
TextColumn::make('units')->state(function (Army $army) {
return $army->totalPoints();
})
TextColumn::make('units')->state(function (Army $army) {
return $army->totalPoints();
})
5 replies