public function account()
 {
     if (Auth::User()) {
         $user_data = Auth::User();
     }
     $requests = array();
     $user = new user();
     $image = new image();
     $feature_img = $image->get_feature_image();
     $friend = new friend();
     $friend_request = $friend->show_friend_request();
     if (is_array($friend_request) && count($friend_request) >= 1) {
         foreach ($friend_request as $request) {
             $requests[] = $user->get_user($request->user_id);
         }
     }
     $get_friends = $friend->get_friends();
     foreach ($get_friends as $get_all_friend) {
         $all_friends[] = $user->get_user($get_all_friend->friend_id);
     }
     if (isset($all_friends) && count($all_friends) != 0) {
         return view('account')->with(array('image' => $feature_img, 'requests' => $requests, 'user_data' => $user_data, 'all_friends' => $all_friends));
     } else {
         return view('account')->with(array('image' => $feature_img, 'requests' => $requests, 'user_data' => $user_data));
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $image = new image();
     $image->delete_user_images($id);
     return Redirect::to('photo');
 }