!!!Done!!!

This commit is contained in:
JunaidJaved8461 2020-10-12 11:03:14 +05:00 committed by GitHub
parent 45cd9d7840
commit 87ba9e970a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -39,8 +39,6 @@ class SessionController extends Controller
$this->customerRepository = $customerRepository;
$this->updatedCustomer = $customerRepository;
}
/**
@ -114,11 +112,11 @@ class SessionController extends Controller
$data['password'] = bcrypt($data['password']);
}
$this->updatedCustomer->update($data, $customer->id);
$updatedCustomer = $this->customerRepository->update($data, $customer->id);
return response()->json([
'message' => 'Your account has been updated successfully.',
'data' => new CustomerResource($this->updatedCustomer->find($customer->id)),
'data' => new CustomerResource($updatedCustomer),
]);
}