How can I ensure that only the user's data is exported?
There is a problem with other user data being downloaded. Only the data that really belongs to the user should be downloaded. How can I ensure this?
Here is my Exporter Class
class ClientExporter extends Exporter
{
protected static ?string $model = Client::class;
public static function getColumns(): array
{
return [
ExportColumn::make('salutation'),
ExportColumn::make('gender'),
ExportColumn::make('firstname'),
ExportColumn::make('lastname'),
];
}
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your client export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {