1
0
forked from poc/pds

Added roles on UserExporter and UserImporter for consistency and enhanced functionality

This commit is contained in:
dhanabalan
2025-08-25 17:00:00 +05:30
parent 1cee8dc71d
commit e6ba543589
2 changed files with 48 additions and 13 deletions

View File

@@ -24,11 +24,17 @@ class UserExporter extends Exporter
return ++$rowNumber;
}),
ExportColumn::make('name')
->label('Name'),
->label('NAME'),
ExportColumn::make('email')
->label('Email'),
->label('E-MAIL'),
ExportColumn::make('password')
->label('Password'),
->label('PASSWORD'),
ExportColumn::make('roles')
->label('ROLES')
->state(function ($record) {
// Assuming Spatie\Permission: roles() relationship
return $record->roles->pluck('name')->join(', ');
}),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('updated_at')