 @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 Chakri Game Rate</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/chakri-rate')}}" autocomplete="off" enctype="multipart/form-data">
                             @csrf
                      <div class="row">

                          @foreach($game as $group)
                                  
                                      <div c class="col-sm-3">
                                           <label for="title"> Game <span class="require label-mandatory">*</span></label>
                                           
                                            <input type="text" class="form-control input-mandatory"
                                       name="game_id[{{$group->id}}]" id="game_id{{$group->id}}" value="{{$group->name}}"  placeholder="" readonly>
                                          
                                   
                                      </div>
                                        <div c class="col-sm-3">
                                          <label for="title">Rate <i class="fa fa-inr" aria-hidden="true"></i> (10)<span class="require label-mandatory">*</span></label>
                               <input type="text" class="form-control "
                                       name="rate[{{$group->id}}]" id="rate{{$group->id}}" value="{{isset($group->gameRate) ? $group->gameRate->rate/10 : ''}}" placeholder="">
                                      </div>
                                
                                   @endforeach
                                     </div>
                           <br>
                            <div class="form-group">

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

                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection

 