Added created_at, updated_at, email while data response with roles
This commit is contained in:
@@ -81,6 +81,9 @@ class UserController extends Controller
|
||||
//$user = User::where('email', $email)->first();
|
||||
if (Hash::check($header_pass, $existUser->password)) {
|
||||
return response()->json([
|
||||
'created_at' => $existUser->created_at->format('Y-m-d H:i:s'),
|
||||
'updated_at' => $existUser->updated_at->format('Y-m-d H:i:s'),
|
||||
'email' => $existUser->email,
|
||||
'roles' => $existUser->roles()->pluck('name')->toArray()
|
||||
], 200);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user