Ejemplo n.º 1
0
 public function index()
 {
     $navFlag = 'home';
     $introduce = Cache::store('redis')->remember('options.introduce', 10, function () {
         $value = Options::where('name', 'introduce')->value('value');
         return $value;
     });
     return view('index.index', compact('navFlag', 'introduce'));
 }
Ejemplo n.º 2
0
 public function addDataForView()
 {
     $this->data['options'] = Options::where('options_group_id', 2)->get()->toArray();
     $options = [];
     while ($option = array_shift($this->data['options'])) {
         $options[$option['code']] = $option;
     }
     $this->data['options'] = $options;
     $this->menu = Pages::where('show_in_menu', 1)->where('active', 1)->orderBy('sort', 'asc')->get()->toArray();
     $this->data['pageData'] = new \stdClass();
 }
Ejemplo n.º 3
0
 public function registerDi()
 {
     $this->container['systemOptions'] = function ($c) {
         return new OptionsFacade(Options::where('options_group_id', 1)->get());
     };
 }
Ejemplo n.º 4
0
 public function coverEdit()
 {
     $introduce = Options::where('name', 'introduce')->value('value');
     return view('admin.settings.cover', compact('introduce'));
 }