/** * Add data to DB scheme * @return null; */ public function run() { Settings::set('link_image_width', 120); Settings::set('link_image_height', 120); Settings::set('slideshow_image_width', 2000); Settings::set('slideshow_image_height', 500); Settings::set('insurance_company_image_width', 180); Settings::set('insurance_company_image_height', 180); }
/** * Register the backend navigation menu. * @return array */ public function registerNavigation() { $sideMenu['home'] = ['label' => trans('axc.datamanagement::lang.home.label.singular'), 'icon' => 'icon-home', 'url' => \Backend::url('axc/datamanagement/home')]; $functionalities = ['abbreviation' => 'code', 'email' => 'envelope', 'phone' => 'phone', 'fax' => 'fax', 'insurance' => 'briefcase', 'link' => 'list', 'route' => 'road', 'slideshow' => 'image']; $settings = \AxC\DataManagement\Models\Settings::instance(); foreach ($functionalities as $func => $icon) { if ($settings->{"enable_{$func}"}) { $sideMenu[$func] = ['label' => trans("axc.datamanagement::lang.{$func}.label.singular"), 'icon' => "icon-{$icon}", 'url' => \Backend::url("axc/datamanagement/{$func}"), 'permissions' => ["axc.data_management.{$func}_access"]]; } } $sideMenu['settings'] = ['label' => trans('system::lang.settings.menu_label'), 'icon' => 'icon-cog', 'url' => \Backend::url('system/settings/update/axc/datamanagement/settings')]; return ['data-management' => ['label' => trans('axc.datamanagement::lang.plugin.navigation'), 'url' => \Backend::url('axc/datamanagement/home'), 'icon' => 'icon-database', 'permissions' => ['axc.data_management.access'], 'order' => 2, 'sideMenu' => $sideMenu]]; }