 @extends('admin.layouts.main-layout')
 @section('content')
 <div class="container">
     <div class="justify-content-center">
         <div class="">
             <div class="card">
                 <div class="card-header">Create Customer</div>
                 <div class="card-body">
                     @if ($errors->any())
                     <div class="alert alert-danger">
                         <ul>
                             @foreach ($errors->all() as $error)
                             <li>{{ $error }}</li>
                             @endforeach
                         </ul>
                     </div>
                     @endif
                     <form role="form" method="post" onsubmit="return validateForm('addsstatus')" class="addsstatus" action="{{url('admin/customer')}}" autocomplete="off" enctype="multipart/form-data">
                         @csrf




                         <div class="form-group">
                             <label for="title">Name <span class="require label-mandatory">*</span></label>
                             <input type="text" class="form-control input-mandatory" name="name" id="name" value="">
                         </div>
                         <div class="form-group">
                             <label for="title">Mobile <span class="require label-mandatory">*</span></label>
                             <input type="text" class="form-control input-mandatory"
                                 name="mobile_number" id="mobile_number" placeholder="" value="">
                         </div>
                         
                         <div class="form-group">
                            <label for="name">Agent <span class="require label-mandatory">*</span></label>
                            <select class="form-control select2"  name="refer_id">
                                <option value="">Select Agent</option>
                                @foreach($users as $key => $user)
                                    <option value="{{$user->id}}">{{$user->name}} ({{$user->mobile_number}})</option>
                                @endforeach
                            </select>
                        </div>
                         <div class="form-group">
                             <label for="title">Password <span class="require label-mandatory"></span></label>
                             <input type="text" class="form-control "
                                 name="password" id="password" placeholder="" value="">
                         </div>
                         <div class="form-group">
                             <label for="title">Conform Password <span class="require "></span></label>
                             <input type="text" class="form-control "
                                 name="confirm-password" id="cpassword" placeholder="" value="">
                         </div>

                         <br>


                         <br>
                         <div class="form-group">

                             <button type="submit" class="btn btn-primary">Submit</button>
                         </div>

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