{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
Cancel
{!! Form::model($grouped_settings, ['route' => ['admin.settings.update'], 'method' => 'post']) !!} @foreach($grouped_settings as $group => $settings)
{!! $group !!} |
@foreach($settings as $setting)
|
---|---|
{!! $setting->name !!} {{$setting->description}} |
@if($setting->type === 'date') {!! Form::input('text', $setting->id, $setting->value, ['class' => 'form-control', 'id' => 'datepicker']) !!} @elseif($setting->type === 'boolean' || $setting->type === 'bool') {!! Form::hidden($setting->id, 0) !!} {!! Form::checkbox($setting->id, null, $setting->value) !!} @elseif($setting->type === 'int' || $setting->type === 'number') {!! Form::number($setting->id, $setting->value, ['class'=>'form-control']) !!} @elseif($setting->type === 'select') {!! Form::select($setting->id, explode(',', $setting->options), $setting->value, ['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) !!} @else {!! Form::input('text', $setting->id, $setting->value, ['class' => 'form-control']) !!} @endif |