Commit 94ecda8c authored by Viral Solani's avatar Viral Solani

Display User role in User api

parent 243d2906
......@@ -19,6 +19,7 @@ class UserResource extends Resource
'id' => $this->id,
'name' => $this->name,
'email' => $this->email,
'role' => $this->roles()->first()->name,
'registered_at' => $this->created_at->toIso8601String(),
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment