Commit f4851348 authored by Nicolas Widart's avatar Nicolas Widart

Show the settings values

parent 4477b3ac
......@@ -23,7 +23,14 @@ class SettingController extends AdminBaseController
public function index()
{
return View::make('setting::admin.settings');
$rawSettings = $this->setting->all();
$settings = [];
foreach ($rawSettings as $setting) {
$settings[$setting->name] = $setting;
}
return View::make('setting::admin.settings', compact('settings'));
}
public function store(SettingRequest $request)
......
<div class='form-group{{ $errors->has("site-name[$lang]") ? ' has-error' : '' }}'>
{!! Form::label("site-name[$lang]", 'Site name:') !!}
{!! Form::text("site-name[$lang]", Input::old("site-name[$lang]"), ['class' => 'form-control', 'placeholder' => 'Site name']) !!}
{!! Form::text("site-name[$lang]", Input::old("site-name[$lang]", $settings['site-name']->translate($lang)->value), ['class' => 'form-control', 'placeholder' => 'Site name']) !!}
{!! $errors->first("site-name[$lang]", '<span class="help-block">:message</span>') !!}
</div>
<div class='form-group{{ $errors->has("site-description[$lang]") ? ' has-error' : '' }}'>
{!! Form::label("site-description[$lang]", 'Site-description:') !!}
{!! Form::textarea("site-description[$lang]", Input::old("site-description[$lang]"), ['class' => 'form-control', 'placeholder' => 'Site description']) !!}
{!! Form::textarea("site-description[$lang]", Input::old("site-description[$lang]", $settings['site-description']->translate($lang)->value), ['class' => 'form-control', 'placeholder' => 'Site description']) !!}
{!! $errors->first("site-description[$lang]", '<span class="help-block">:message</span>') !!}
</div>
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