public function insert_posts($post_detail)
 {
     $Evebidpost = new Evebid();
     $date1 = $post_detail['post_time'];
     $date = str_replace('.', '-', $date1);
     $post_id = $Evebidpost->where('post_id', $post_detail['post_id'])->pluck('id');
     if (empty($post_detail)) {
         return false;
     }
     if (!empty($post_id)) {
         echo "<br>";
         $row = $Evebidpost->find($post_id);
         if ($row->lastpost_time == date('Y-m-d H:i:s', strtotime($date))) {
             echo "Already Updated";
             return true;
         }
         return;
     }
     $Evebidpost->threadid = $post_detail['threadid'];
     $Evebidpost->post_id = trim(strip_tags($post_detail['post_id']));
     $Evebidpost->bid_id = trim(strip_tags($post_detail['bid_id']));
     $Evebidpost->char_id = trim(strip_tags($post_detail['char_id']));
     $Evebidpost->post_rank = trim(strip_tags($post_detail['post_rank']));
     $Evebidpost->post_time = trim(strip_tags($post_detail['post_time']));
     $Evebidpost->profile_link = trim(strip_tags($post_detail['profile_link']));
     $Evebidpost->username = trim(strip_tags($post_detail['username']));
     $Evebidpost->wall_post = trim($post_detail['wall_post']);
     $Evebidpost->update_time = date('Y-m-d H:i:s');
     echo "<br>";
     echo "Inserted";
     $save_Eveapi = $Evebidpost->save();
     return $save_Eveapi;
 }
 public function getHighestBids($tid)
 {
     /**-------Get Highest Bid -------**/
     $top_three_bids = Evebid::where('bid_id', $tid)->where('post_rank', "!=", 1)->orderBy('bid_amount', 'desc')->take(3)->get();
     $top_bid = array();
     foreach ($top_three_bids as $top_bids) {
         $top_bid[] = $top_bids['bid_amount'];
     }
     return $top_bid;
 }