@extends('layout.app')
@section('content')
    <div class="card">

        <div class="card-body">

            <form action="{{ route('formSetting.store') }}" method="POST">
                <div class="row">
                    @csrf

                    @foreach ($list as $r)
                        <div class="form-group col-md-3">
                            <label for="">{{ $r->name }}</label>
                            <select name="action[{{ $r->id }}]"
                                class="form-control @if ($r->status == 'active') bg-success @endif">
                                <option value="active" {{ $r->status == 'active' ? 'selected' : '' }}>Active</option>
                                <option value="inactive" {{ $r->status == 'inactive' ? 'selected' : '' }}>Inactive</option>
                            </select>
                        </div>
                    @endforeach

                    <div class="col-md-12">
                        <button class="btn btn-success float-right" type="submit">Update</button>
                    </div>
                </div>
            </form>
        </div>

        <style>
            a.btn.btn-primary {
                width: 200px;
            }
        </style>
    @endsection
