 @extends('admin.layouts.main-layout')
 @section('content')
   <div class="container">
        <div class="justify-content-center">
            <div class="">
                <div class="card">
                    <div class="card-header">Update 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/game-rate/'.$detail->id)}}" autocomplete="off" enctype="multipart/form-data">
                               @csrf
                             {{ method_field('PATCH') }}
                       

                           
                              <div class="form-group">
                                <label for="title">Select Game <span class="require label-mandatory">*</span></label>
                                <select  class="form-control select2 input-mandatory game_id" name="game_id" id="game_id">
                                <option>
                                    Select Game
                                </option>
                                 @foreach($game as $group)-->
                                <option value="{{$group->id}}" {{$detail->game_id == $group->id ? 'Selected' : ''}}>
                                    {{$group->name}}
                                </option>
                                @endforeach
                            </select>
                            </div>
                           
                            <div class="form-group">
                                <label for="title">Rate <i class="fa fa-inr" aria-hidden="true"></i> (100)<span class="require label-mandatory">*</span></label>
                               <input type="number" class="form-control input-mandatory"
                                       name="rate" id="rate"  placeholder="" value="{{$detail->rate}}">
                            </select>
                            </div>
                           
                            <div class="form-group">

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

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

@endsection

 