public function __construct()
 {
     $this->site_infos = Site_infos::first();
     $this->destination = Country::select('id', 'name', 'url')->where('status', 'Active')->get();
     $this->menu = Page::where('status', 'Active')->where('parent_id', 0)->where('status', 'Active')->get();
     /**
      * find parent id on the menu and concatenate related sub menu to Array
      * */
     foreach ($this->menu as $key => $m) {
         $this->menu[$key]->sub_menu = Page::where('parent_id', $m->id)->where('status', 'Active')->get()->toArray();
     }
     /**
      * find the country related category
      */
     foreach ($this->destination as $key => $d) {
         $this->destination[$key]->category = category::select('name', 'url')->where('country_id', $d->id)->where('status', 'Active')->get()->toArray();
     }
 }
 protected function __checkduplicateurl($id, $url)
 {
     if (Page::where('id', '!=', $id)->where('url', $url)->count() == 0) {
         return true;
     } else {
         return false;
     }
 }