Commit af602fa3 authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Setting/' changes from 6a6dfc9..5ede50e

5ede50e Use shorter version
7ab6713 Using the new method on the Translation trait
95a05fb remove view namespace definitions from start file
a77df4b Adding start.php to files array
570f55e Update to new pingpong/modules version

git-subtree-dir: Modules/Setting
git-subtree-split: 5ede50e723db1fab55d6c7c86c376c9c10f83925
parent 7d9f72bc
......@@ -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"
]
}
\ No newline at end of file
}
<?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