/** * Update handler. * * @param $clientId * * @return \Illuminate\Http\Response|\Laravel\Passport\Client * @throws \Illuminate\Validation\ValidationException */ public function update($clientId) { if (!$this->request->user()->clients->find($clientId)) { return new Response('', 404); } $this->validation->make($this->request->all(), ['name' => 'required|max:255', 'redirect' => 'required|url'])->validate(); return $this->clients->update($this->request->user()->clients->find($clientId), $this->request->name, $this->request->redirect); }