Commit 3ed87933 authored by Nicolas Widart's avatar Nicolas Widart

Merge commit 'af602fa3'

* commit 'af602fa3':
  Squashed 'Modules/Setting/' changes from 6a6dfc9..5ede50e
parents a0b7964e af602fa3
......@@ -48,6 +48,7 @@ class SettingController extends AdminBaseController
public function getModuleSettings($currentModule)
{
$this->session->set('module', $currentModule);
$modulesWithSettings = $this->setting->moduleSettings($this->module->enabled());
$translatableSettings = $this->setting->translatableModuleSettings($currentModule);
......
......@@ -121,7 +121,7 @@ class EloquentSettingRepository extends EloquentBaseRepository implements Settin
private function setTranslatedAttributes($settingValues, $setting)
{
foreach ($settingValues as $lang => $value) {
$setting->translate($lang)->value = $value;
$setting->translateOrNew($lang)->value = $value;
}
}
......
......@@ -9,5 +9,8 @@
"providers": [
"Modules\\Setting\\Providers\\SettingServiceProvider",
"Modules\\Setting\\Providers\\RouteServiceProvider"
],
"files": [
"start.php"
]
}
<?php
/*
|--------------------------------------------------------------------------
| Register The Module Namespaces
|--------------------------------------------------------------------------
|
| Here is you can register the namespace for this module.
| You may to edit this namespace if you want.
|
*/
View::addNamespace('setting', __DIR__ . '/Resources/views/');
Lang::addNamespace('setting', __DIR__ . '/Resources/lang/');
Config::addNamespace('setting', __DIR__ . '/Config/');
require __DIR__ . '/composers.php';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment