Current File : //home/tradevaly/demo.tradevaly.com.bd/resources/views/backend/users/edit.blade.php
@extends('layouts.backend')

    @section('content')  
<!-- Container Fluid-->
            <div class="row">
                <div class="col-lg-12">
                  <!-- Form Basic -->
                  <div class="card mb-4">
                    <div class="card-header card-header-modify py-3 d-flex flex-row align-items-center justify-content-between">
                      <h6 class="m-0 font-weight-bold text-heading-bar">Edit User</h6>
                        <a href="{{route('users.index')}}" class="btn btn-default-index  btn-sm text-right "><i class="fas fa-arrow-alt-circle-left"></i> Back</a>
                    </div>
                    <div class="card-body">
                        
                        {!! Form::model($user, ['method' => 'PATCH','route' => ['users.update', $user->id]]) !!}
                            
                            <div class="row">

                                
                                <div class="form-group col-sm-6">
                                  <label for="exampleInputEmail1">Name<span style="color: red"> *</span></label>
                                    <div>
                                        {!! Form::text('name', null, array('placeholder' => 'Enter name','class' => 'form-control', 'required' => '')) !!}
                                        @error('name')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('name') }}</strong>
                                            </span>
                                        @enderror
                                    </div>
                                </div>


                                <div class="form-group col-sm-6">
                                  <label for="exampleInputEmail1">Mobile<span style="color: red"> *</span></label>
                                    <div>
                                        {!! Form::text('mobile', null, array('placeholder' => 'Enter mobile','class' => 'form-control', 'required' => '')) !!}
                                        @error('mobile')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('mobile') }}</strong>
                                            </span>
                                        @enderror
                                    </div>
                                </div>


                                <div class="form-group col-sm-6">
                                  <label for="exampleInputEmail1">Email<span style="color: red"> *</span></label>
                                    <div>
                                        {!! Form::text('email', null, array('placeholder' => 'Enter email','class' => 'form-control', 'required' => '')) !!}
                                        @error('email')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('email') }}</strong>
                                            </span>
                                        @enderror
                                    </div>
                                </div>


                                <div class="form-group col-sm-6">
                                  <label for="exampleInputEmail1">Password<span style="color: red"> *</span></label>
                                    <div>
                                        {!! Form::password('password', array('placeholder' => 'Enter password','class' => 'form-control')) !!}

                                        @error('password')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('password') }}</strong>
                                            </span>
                                        @enderror
                                    </div>
                                </div>


                                <div class="form-group col-sm-6">
                                  <label for="exampleInputEmail1">Confirm Password<span style="color: red"> *</span></label>
                                    <div>
                                        {!! Form::text('confirm-password', null, array('placeholder' => 'Enter confirm password','class' => 'form-control')) !!}
                                        @error('confirm-password')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('confirm-password') }}</strong>
                                            </span>
                                        @enderror
                                    </div>
                                </div>

                                <div class="form-group col-sm-6">
                                  <label for="exampleInputEmail1">Country<span style="color: red"> *</span></label>
                                    <div>
                                        {!! Form::select('country_id', [''=>'Select Country']+$country,$user->country_id, array('class' => 'form-control','')) !!}

                                        @error('country_id')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('country_id') }}</strong>
                                            </span>
                                        @enderror
                                    </div>
                                </div>


                                <div class="form-group col-sm-6">
                                  <label for="exampleInputEmail1">Roll<span style="color: red"> *</span></label>
                                    <div>
                                        {!! Form::select('roles', [null=>'Select Roll']+$roles,$userRole, array('class' => 'form-control','')) !!}

                                        @error('roles')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('roles') }}</strong>
                                            </span>
                                        @enderror
                                    </div>
                                </div>
                                                                                   
                            </div>                            
                          
                        <button type="submit" class="btn btn-success">Update</button>
                        {!! Form::close() !!}
                    </div>
                  </div>
                </div>
            </div>
          <!--Row-->


    @endsection