當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Setting::allSetting方法代碼示例

本文整理匯總了PHP中app\Setting::allSetting方法的典型用法代碼示例。如果您正苦於以下問題:PHP Setting::allSetting方法的具體用法?PHP Setting::allSetting怎麽用?PHP Setting::allSetting使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Setting的用法示例。


在下文中一共展示了Setting::allSetting方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: BuildLayout

 public function BuildLayout()
 {
     $settings = Setting::allSetting();
     $navigations = ['super' => [['title' => 'Төслүүд', 'url' => url('projects')], ['title' => 'Төсөл нэмэх', 'url' => url('project/add')], ['title' => 'Бидний тухай', 'url' => url('about-us')]], 'user' => [['title' => 'Нэвтрэх', 'url' => '#', 'attributes' => ['data-toggle' => 'modal', 'data-target' => '#loginModal']], ['title' => 'Бүртгүүлэх', 'url' => '#', 'attributes' => ['data-toggle' => 'modal', 'data-target' => '#registerModal']]], 'about' => [['title' => 'Блог', 'url' => url('blog')], ['title' => 'Хамтран ажиллагсад', 'url' => url('about-partners')], ['title' => 'Дэмжигчид', 'url' => url('about-supporters')], ['title' => 'Үйлчилгээний нөхцөл', 'url' => url('tos')]], 'help' => [['title' => 'Түгээмэл асуулт, хариулт', 'url' => url('faq')], ['title' => 'Хэрхэн хөрөнгө оруулах', 'url' => url('funding')], ['title' => 'Төслийн шалгуур', 'url' => url('requirment')]]];
     $categories = \App\Category::where('type', 1)->get();
     foreach ($categories as $c) {
         $navigations['categories'][] = ['title' => $c->title, 'url' => $c->url];
     }
     if ($this->user) {
         $navigations['profile'] = [['title' => 'Миний төслүүд', 'url' => url('user/projects')], ['title' => 'Дэмжсэн төслүүд', 'url' => url('user/support')], ['title' => 'Бүртгэлийн тохиргоо', 'url' => url('user/edit/profile')], ['title' => 'Нууц үг солих', 'url' => url('user/edit/profile/password')]];
         $navigations['user'] = [['title' => 'Миний бүртгэл', 'url' => url('user/profile'), 'child' => $navigations['profile']], ['title' => 'Гарах', 'url' => url('user/logout')]];
         $navigations['admin'] = [['title' => 'Төслүүд', 'url' => url('admin/projects')], ['title' => 'Ангилалууд', 'url' => url('admin/categories')], ['title' => 'Агуулгууд', 'url' => url('admin/content')]];
         if ($this->user->role == 1) {
             $navigations['user'][] = ['title' => 'Админ цэс', 'url' => url('admin'), 'child' => $navigations['admin']];
         }
     }
     $recaptchakey = Setting::getSetting('recaptchakey');
     $this->view = view($this->layout)->withStyles($this->styles)->withScripts($this->scripts)->withSettings($settings)->withMetas($this->metas)->withNavigations($navigations)->with('recaptchakey', $recaptchakey);
     if ($this->user) {
         $this->view->withUserlevel($this->user->usr_level);
     }
     return $this->view;
     // Run the 'csrf' filter on all post, put, patch and delete requests.
     //$this->beforeFilter('csrf', ['on' => ['post', 'put', 'patch', 'delete']]);
 }
開發者ID:sordev,項目名稱:bootup,代碼行數:25,代碼來源:Controller.php


注:本文中的app\Setting::allSetting方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。