first(); if(empty($hobbies)){ $hobbies = new Hobby; $hobbies->user_id = $id; } $hobbies->hobbies = $request->hobbies; $hobbies->interests = $request->interests; $hobbies->music = $request->music; $hobbies->books = $request->books; $hobbies->movies = $request->movies; $hobbies->tv_shows = $request->tv_shows; $hobbies->sports = $request->sports; $hobbies->fitness_activities = $request->fitness_activities; $hobbies->cuisines = $request->cuisines; $hobbies->dress_styles = $request->dress_styles; if($hobbies->save()){ flash(translate('Hobby and Interests info has been updated successfully'))->success(); return back(); } else { flash(translate('Sorry! Something went wrong.'))->error(); return back(); } } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }