コード例 #1
0
ファイル: HomeController.php プロジェクト: huycao/yodelivery
 public function contactInfo()
 {
     $countryModel = new CountryBaseModel();
     $data['listCountry'] = $countryModel->getAllForm();
     //pr($this->data['listCountry']); die;
     $data['listWebsiteCategory'] = CategoryBaseModel::where('status', 1)->where('parent_id', 0)->where('name', '!=', 'Other')->orderBy('name', 'asc')->get()->toArray();
     $data['listLanguage'] = LanguageBaseModel::where('status', 1)->orderBy('name', 'asc')->get()->toArray();
     //$this->data['listReason']			= $this->model->reason;
     if (\Request::isMethod('post')) {
         $this->postContactInfo($data);
     }
     $data['slugMenu'] = '';
     return view('home.contactInfoPage', $data);
 }
コード例 #2
0
 public function getCategoryByIdAttribute()
 {
     $modelCate = new CategoryBaseModel();
     $item = $modelCate->where('id', $this->category)->select('id', 'name')->first();
     if (!empty($item)) {
         return $item->name;
     } else {
         return FALSE;
     }
 }