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;
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()
{
return Resource::find('1')->getPageData();
}
+
+ protected function _getSettingsFromCMS()
+ {
+ return Settings::find('1')->getPageData();
+ }
}
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']);
}