{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
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, list_to_assoc(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 |