From c2bb8711a0b5b79e84d5378556c27b13d2c8c52b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 27 Jan 2016 07:52:30 +1100 Subject: [PATCH] Bug Fixed --- app/Http/Controllers/ClientApiController.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ClientApiController.php b/app/Http/Controllers/ClientApiController.php index cf93c68c99..da270854c3 100644 --- a/app/Http/Controllers/ClientApiController.php +++ b/app/Http/Controllers/ClientApiController.php @@ -131,11 +131,13 @@ class ClientApiController extends BaseAPIController * ) */ - public function update(UpdateClientRequest $request) + public function update(UpdateClientRequest $request, $publicId) { - $client = $this->clientService->save($request->input()); + $data = $request->input(); + $data['public_id'] = $publicId; + $this->clientService->save($data); - $client = Client::scope($client->public_id) + $client = Client::scope($publicId) ->with('country', 'contacts', 'industry', 'size', 'currency') ->first();