*/
protected $hidden = [
'password', 'remember_token', 'system_name', 'email_confirmed', 'external_auth_id', 'email',
- 'created_at', 'updated_at', 'image_id', 'roles', 'avatar',
+ 'created_at', 'updated_at', 'image_id', 'roles', 'avatar', 'user_id',
];
/**
/**
* Create a new user in the system.
+ * Requires permission to manage users.
*/
public function create(Request $request)
{
/**
* Update an existing user in the system.
+ * Requires permission to manage users.
* @throws UserUpdateException
*/
public function update(Request $request, string $id)
--- /dev/null
+{
+ "name": "Dan Brown",
+ "email": "dannyb@example.com",
+ "roles": [1],
+ "language": "fr",
+ "send_invite": true
+}
\ No newline at end of file
--- /dev/null
+{
+ "name": "Dan Spaggleforth",
+ "email": "dspaggles@example.com",
+ "roles": [2],
+ "language": "de",
+ "password": "hunter2000"
+}
\ No newline at end of file
--- /dev/null
+{
+ "id": 1,
+ "name": "Dan Brown",
+ "email": "dannyb@example.com",
+ "created_at": "2022-02-03T16:27:55.000000Z",
+ "updated_at": "2022-02-03T16:27:55.000000Z",
+ "external_auth_id": "abc123456",
+ "slug": "dan-brown",
+ "last_activity_at": "2022-02-03T16:27:55.000000Z",
+ "profile_url": "https://docs.example.com/user/dan-brown",
+ "edit_url": "https://docs.example.com/settings/users/1",
+ "avatar_url": "https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg",
+ "roles": [
+ {
+ "id": 1,
+ "display_name": "Admin"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+{
+ "data": [
+ {
+ "id": 1,
+ "name": "Dan Brown",
+ "email": "dannyb@example.com",
+ "created_at": "2022-02-03T16:27:55.000000Z",
+ "updated_at": "2022-02-03T16:27:55.000000Z",
+ "external_auth_id": "abc123456",
+ "slug": "dan-brown",
+ "user_id": 1,
+ "last_activity_at": "2022-02-03T16:27:55.000000Z",
+ "profile_url": "https://docs.example.com/user/dan-brown",
+ "edit_url": "https://docs.example.com/settings/users/1",
+ "avatar_url": "https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg"
+ },
+ {
+ "id": 2,
+ "name": "Benny",
+ "email": "benny@example.com",
+ "created_at": "2022-01-31T20:39:24.000000Z",
+ "updated_at": "2021-11-18T17:10:58.000000Z",
+ "external_auth_id": "",
+ "slug": "benny",
+ "user_id": 2,
+ "last_activity_at": "2022-01-31T20:39:24.000000Z",
+ "profile_url": "https://docs.example.com/user/benny",
+ "edit_url": "https://docs.example.com/settings/users/2",
+ "avatar_url": "https://docs.example.com/uploads/images/user/2021-11/thumbs-50-50/guest.jpg"
+ }
+ ],
+ "total": 28
+}
\ No newline at end of file
--- /dev/null
+{
+ "id": 1,
+ "name": "Dan Brown",
+ "email": "dannyb@example.com",
+ "created_at": "2022-02-03T16:27:55.000000Z",
+ "updated_at": "2022-02-03T16:27:55.000000Z",
+ "external_auth_id": "abc123456",
+ "slug": "dan-brown",
+ "last_activity_at": "2022-02-03T16:27:55.000000Z",
+ "profile_url": "https://docs.example.com/user/dan-brown",
+ "edit_url": "https://docs.example.com/settings/users/1",
+ "avatar_url": "https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg",
+ "roles": [
+ {
+ "id": 1,
+ "display_name": "Admin"
+ }
+ ]
+}
\ No newline at end of file
--- /dev/null
+{
+ "id": 1,
+ "name": "Dan Spaggleforth",
+ "email": "dspaggles@example.com",
+ "created_at": "2022-02-03T16:27:55.000000Z",
+ "updated_at": "2022-02-03T16:27:55.000000Z",
+ "external_auth_id": "abc123456",
+ "slug": "dan-spaggleforth",
+ "last_activity_at": "2022-02-03T16:27:55.000000Z",
+ "profile_url": "https://docs.example.com/user/dan-spaggleforth",
+ "edit_url": "https://docs.example.com/settings/users/1",
+ "avatar_url": "https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg",
+ "roles": [
+ {
+ "id": 2,
+ "display_name": "Editors"
+ }
+ ]
+}
\ No newline at end of file