]> _ Git - odl.git/commitdiff
wip #5027 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 Jan 2022 15:28:01 +0000 (16:28 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 Jan 2022 15:28:01 +0000 (16:28 +0100)
app/Http/Controllers/FrontController.php
app/Models/Settings.php

index 1c7f1e5dc3ccfc266b84a53f5118f711f08dff2d..d71da10092eb46e2f3a02817dc1e060f271aa7e4 100644 (file)
@@ -7,6 +7,7 @@ use App\Models\AssetTheme;
 use App\Models\Menu;
 use App\Models\Publication;
 use App\Models\Resource;
+use App\Models\Settings;
 use Cubist\Backpack\Magic\PageData;
 use Cubist\Util\Files\Files;
 
@@ -59,7 +60,12 @@ class FrontController extends Controller
 
     protected function _getDataFromCMS()
     {
-        return ['menu' => $this->_getMenuFromCMS(), 'resources' => $this->_getResourcesFromCMS(), 'home' => $this->_getHomeFromCMS(), 'medialibrary' => $this->_getMediaLibraryFromCMS(), 'resources_pdf' => $this->_getResourcesPDFFromCMS()];
+        return ['menu' => $this->_getMenuFromCMS(),
+            'resources' => $this->_getResourcesFromCMS(),
+            'home' => $this->_getHomeFromCMS(),
+            'medialibrary' => $this->_getMediaLibraryFromCMS(),
+            'resources_pdf' => $this->_getResourcesPDFFromCMS(),
+            'settings' => $this->_getSettingsFromCMS()];
     }
 
     protected function _getMenuFromCMS()
@@ -121,4 +127,9 @@ class FrontController extends Controller
     {
         return Resource::find('1')->getPageData();
     }
+
+    protected function _getSettingsFromCMS()
+    {
+        return Settings::find('1')->getPageData();
+    }
 }
index 542ab0ba7df36c0685762adfc0a25598c6554697..57e2df2bb6eb72cb604f3b68ae5b9133446d4bb6 100644 (file)
@@ -13,7 +13,7 @@ class Settings extends \Cubist\Backpack\Magic\Models\Settings
 
     public function setFields()
     {
-        $this->addField('pin', 'Text', 'Code PIN', ['pattern' => '\d{4}']);
+        $this->addField('pin', 'Text', 'Code PIN', ['pattern' => '\d{4}', 'translatable' => false, 'tab' => 'Splash']);
 
 
     }