Package: csv-users
Generated from api/packages/csv-users
Source: api/packages/csv-users · imported version 0.1.16. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”What does it do
Section titled “What does it do”This package is used to export and import users in the .csv format.
Installation
Section titled “Installation”composer require ulams/csv-usersphp artisan db:seed --class="Ulams\CsvUsers\Database\Seeders\CsvUsersPermissionSeeder"
Example
Section titled “Example”| id | name | first_name | last_name | country | is_active | created_at | onboarding_completed | email_verified | interests | avatar | roles | permissions | path_avatar | contact | bio | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16 | Valentine Wehnner | Valentine | Wehnner | jhyatt@example.net | Poland | 2021-10-14T15:50:28.000000Z | TRUE | TRUE | LMS | localhost/storage/avatars/16/logo.png | [“tutor”] | [“access dashboard”] | avatars/16/logo.png | 1234567 | bio |
-
Export uses fields from
Ulams\Auth\Http\Resources\UserFullResource -
Import uses the
updateorcreatemethod fromUlams\Auth\Repositories\Contracts\UserRepositoryContract. If the email exists in the database, the user’s data is updated. Otherwise, a new user is created.
Endpoints
Section titled “Endpoints”All the endpoints are defined in
Run ./vendor/bin/phpunit to run tests. Test details
Events
Section titled “Events”Ulams\CsvUsers\Events\UlamsImportedNewUserTemplateEvent=> Event is dispatched after importing a new user.
How to use this on frontend
Section titled “How to use this on frontend”Admin panel
Section titled “Admin panel”Import and export button

Permissions
Section titled “Permissions”Permissions are defined in seeder
More documentation in the package
Section titled “More documentation in the package”API endpoints
Section titled “API endpoints”| Method | Path | Auth | Action |
|---|---|---|---|
GET |
/api/admin/csv/users |
yes | CsvUserAPIController@export |
POST |
/api/admin/csv/users |
yes | CsvUserAPIController@import |
GET |
/api/admin/csv/groups/{group} |
yes | CsvGroupAPIController@export |
POST |
/api/admin/csv/groups |
yes | CsvGroupAPIController@import |
Permissions
Section titled “Permissions”| Permission | Seeded for roles | Constant |
|---|---|---|
csv-users_export |
admin | CsvUserPermissionsEnum::CSV_USERS_EXPORT |
csv-users_import |
admin | CsvUserPermissionsEnum::CSV_USERS_IMPORT |
csv-user_group_export |
admin | CsvUserPermissionsEnum::CSV_USER_GROUP_EXPORT |
csv-user_group_import |
admin | CsvUserPermissionsEnum::CSV_USER_GROUP_IMPORT |
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”| Event | Description | Notification templates |
|---|---|---|
UlamsImportedNewUserTemplateEvent |
Notification templates registered here
Section titled “Notification templates registered here”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”None.