@extends('welcome')
@section('content')
    <div class="my-3">
        @if(session('alert'))
            <div class="alert alert-warning alert-dismissible fade show" role="alert">
                <strong>{{ session('alert') }} </strong>
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
        @endif
    </div>
    <div class="mt-3">
        
        <form action="{{ route('toimport') }}" method="post" enctype="multipart/form-data">
            @csrf
            <h4 class="mb-3">Data Import Form</h4>
            <div class="mb-3">
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="snamelabel">Data Amount</span>
                    </div>
                    <input type="text" placeholder="From-To (eg: 1-200)" class="form-control" name="sname" aria-describedby="snamelabel" id="sname" required>
                </div>
                
            </div>
            <div class="custom-file mb-3">
                {{-- <input type="file" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" class="custom-file-input" name="importfile" id="file" required>
                <label class="custom-file-label" for="file">Choose File</label> --}}

                <input type="file" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" name="importfile" required>
            </div>

            <button class="btn btn-primary">Upload</button>
        </form>
        
    </div>
@endsection

