Count when click on table row to view model
Hey! I have a resource table with messages and a simple view modal. How i can set the reat_at date on the model when the message modal was opened?
Tables\Actions\ViewAction::make()
->mutateRecordDataUsing(function(Email $record) {
$record->read_at = now();
$record->save();
return $record->toArray();
}),