@extends('layout.app')

@section('content')

    <div class="card">
        <div class="card-body">
            <form action="{{ route('users.export') }}" method="POST">
                @csrf
                {{-- @dd($reseller->name) --}}
                <div class="form-group">
                    <label>Select Reseller</label>
                    <select name="reseller_id" class=" form-control">
                        {{-- <option value="{{$reseller->id}}">{{ $reseller->name }}</option> --}}
                        @hasrole('Admin')
                            @foreach ($resellers as $r)
                                <option value="{{ $r->id }}">{{ $r->name }}</option> --}}
                            @endforeach
                        @endhasrole
                        @hasrole('Reseller')
                            <option value="{{ $reseller->id }}">{{ $reseller->name }}</option>
                        @endhasrole
                    </select>


                </div>

                <div class="form-group float-right">
                    <button class="btn btn-primary" type="submit"><i class="fas fa-file-excel"></i> Export To Excel</button>
                    <button class="btn btn-info" type="reset" id="reset">Reset</button>
                </div>

            </form>
        </div>
    </div>
@endsection
