/**
  *     SaveOrder
  *     @param  integer $id
  */
 function saveOrder()
 {
     if (Request::ajax()) {
         $listorder = $_POST['menu'];
         if (is_array($listorder)) {
             $order = 1;
             foreach ($listorder as $id => $value) {
                 $item = AdFlightAdvertiserManagerModel::find($id);
                 $item->order = $order;
                 $item->update();
                 $order++;
             }
             return "TRUE";
         }
         return "FALSE";
     }
 }
 /**
  * Remove the specified resource from storage.
  * @return Response
  */
 public function deleteFlight()
 {
     if (Request::ajax()) {
         $id = Input::get('id');
         $status = FALSE;
         $view = NULL;
         $item = AdFlightAdvertiserManagerModel::find($id);
         if ($item) {
             $adId = $item->ad_id;
             $adData = AdBaseModel::find($adId);
             if ($item->delete()) {
                 $status = TRUE;
                 $this->data['flightAdList'] = $adData->flightAd;
                 $view = View::make('flightList', $this->data)->render();
             }
         }
         return Response::json(array('status' => $status, 'view' => $view));
     }
 }