Commit 7d9f72bc authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Setting/' changes from fb7cc0f..6a6dfc9

6a6dfc9 Redirect to the same module setting tab
cd3365e Redirect to correct setting view

git-subtree-dir: Modules/Setting
git-subtree-split: 6a6dfc9a1af6151d67792b7294f790c3689c5456
parent 45c2c06b
<?php namespace Modules\Setting\Http\Controllers\Admin;
use Illuminate\Session\Store;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\View;
use Laracasts\Flash\Flash;
......@@ -17,13 +18,18 @@ class SettingController extends AdminBaseController
* @var Module
*/
private $module;
/**
* @var Store
*/
private $session;
public function __construct(SettingRepository $setting)
public function __construct(SettingRepository $setting, Store $session)
{
parent::__construct();
$this->setting = $setting;
$this->module = app('modules');
$this->session = $session;
}
public function index()
......@@ -36,11 +42,12 @@ class SettingController extends AdminBaseController
$this->setting->createOrUpdate($request->all());
Flash::success('Settings saved!');
return Redirect::route('dashboard.setting.index');
return Redirect::route('dashboard.module.settings', [$this->session->get('module', 'Core')]);
}
public function getModuleSettings($currentModule)
{
$this->session->set('module', $currentModule);
$modulesWithSettings = $this->setting->moduleSettings($this->module->enabled());
$translatableSettings = $this->setting->translatableModuleSettings($currentModule);
......
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