function showUpdate($id = 0)
 {
     $this->data['id'] = $id;
     $this->data['user'] = FALSE;
     $this->data['statusLists'] = Config::get('data.approve_status');
     //get country
     $this->data['countryLists'] = CountryBaseModel::select('id', 'country_name')->get();
     //get language
     $this->data['languageLists'] = LanguageBaseModel::select('id', 'name')->get();
     //get category
     $this->data['channelLists'] = CategoryBaseModel::select('id', 'name')->where('parent_id', 0)->where('status', 1)->get();
     // WHEN UPDATE SHOW CURRENT INFOMATION
     if ($id != 0) {
         $item = $this->model->find($id);
         if ($item) {
             //get site language
             $this->data['languageSelected'] = $item->language->lists('id');
             //get serve country
             $this->data['countryServeSelected'] = $item->serveCountry->lists('id');
             //get site channel
             $this->data['channelSelected'] = $item->channel->lists('id');
             $this->data['item'] = $item;
             if ($item->user_id != 0) {
                 $user = Sentry::findUserById($item->user_id);
                 $this->data['user'] = $user;
             }
         } else {
             return Redirect::to($this->moduleURL);
         }
     }
     if (Request::isMethod('post')) {
         if ($this->postUpdate($id)) {
             return Redirect::to($this->moduleURL);
         }
     }
     $this->layout->content = View::make('showCreate', $this->data);
 }
 public function showListPublisher()
 {
     $this->data['defaultField'] = $this->defaultField;
     $this->data['defaultOrder'] = $this->defaultOrder;
     $this->data['defaultURL'] = $this->moduleURL;
     //get country
     $this->data['itemCountry'] = modelCountry::select('id', 'country_name')->get();
     //get category
     $this->data['itemCate'] = modelCategory::select('id', 'name')->get();
     $this->data['publisher_approved'] = Config::get('backend.publisher_approved');
     if (method_exists($this, 'beforeShowList')) {
         $this->beforeShowList();
     }
     $this->layout->content = View::make('showListPublisher', $this->data);
 }