[ 'is_avatar' => TRUE, ], 'url' => '/client/document', 'multi_upload' => FALSE, ]; return view('portal.default.profile.index', $data); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(UpdateContactRequest $request, ClientContact $client_contact) { $client_contact->fill($request->all()); //update password if needed if($request->input('password')) $client_contact->password = Hash::make($request->input('password')); $client_contact->save(); // auth()->user()->fresh(); return back(); } public function updateClient(UpdateClientRequest $request, ClientContact $client_contact) { $client = $client_contact->client; //update avatar if needed if($request->file('logo')) { $path = UploadAvatar::dispatchNow($request->file('logo'), auth()->user()->client->client_hash); if($path) $client->logo = $path; } $client->fill($request->all()); $client->save(); return back(); } }