@extends('layouts.admin')
@section('title', $module->getName())
@section('content')
    
    
        {!! Form::model($setting, [
            'method' => 'PATCH',
            'url' => ['settings/modules/' . $module->getAlias()],
            'files' => true,
            'role' => 'form'
        ]) !!}
        
            @foreach($module->get('settings') as $field)
                @php $type = $field['type']; @endphp
                @if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
                    {{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['attributes']) }}
                @elseif ($type == 'textareaGroup')
                    {{ Form::$type($field['name'], trans($field['title'])) }}
                @elseif ($type == 'selectGroup')
                    {{ Form::$type($field['name'], trans($field['title']), $field['icon'], $field['values'], $field['selected'], $field['attributes']) }}
                @elseif ($type == 'radioGroup')
                    {{ Form::$type($field['name'], trans($field['title']), trans($field['enable']), trans($field['disable']), $field['attributes']) }}
                @elseif ($type == 'checkboxGroup')
                    {{ Form::$type($field['name'], trans($field['title']), $field['items'], $field['value'], $field['id'], $field['attributes']) }}
                @elseif ($type == 'fileGroup')
                    {{ Form::$type($field['name'], trans($field['title']), $field['attributes']) }}
                @endif
            @endforeach
        
        
        
        
        {!! Form::close() !!}