@extends('admin.layouts.app')

    @section('styles')

    @endsection

        @section('content')

                           <!-- PAGE-HEADER -->
                           <div class="page-header">
                            <h1 class="page-title">Site Setting</h1>
                            <div>
                                <ol class="breadcrumb">
                                    <li class="breadcrumb-item"><a href="javascript:void(0)">Pages</a></li>
                                    <li class="breadcrumb-item active" aria-current="page">Setting</li>
                                </ol>
                            </div>
                        </div>
                        <!-- PAGE-HEADER END -->

                        <!-- ROW-1 OPEN -->
                        <div class="row">
                          
                            <form id="create_user" action="{{url('admin/settings')}}" method="post">
                                 @csrf
                            <div class="col-xl-12">
                                <div class="card">
                                    <div class="card-header">
                                        <h3 class="card-title">Create/Update</h3>
                                    </div>
                                    <div class="card-body">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-12">
                                                <div class="form-group">
                                                    <label for="exampleInputname">Site Name</label>
                                                    <input type="text" value="@if(@$settingData->site_name!==''){{@$settingData->site_name}}@endif"  name="sitename" class="form-control" id="exampleInputname" placeholder="Site Name">
                                                    @if($errors->has('sitename'))
                                                        <div class="error">{{ $errors->first('sitename') }}</div>
                                                   @endif
                                                </div>
                                            </div>
                                            <div class="col-lg-6 col-md-12">
                                                <div class="form-group"> 
                                                    <label for="exampleInputname1">Site link</label>
                                                    <input type="text" value="@if(@$settingData->site_link!==''){{@$settingData->site_link}}@endif" name="sitelink" class="form-control" id="exampleInputname1" placeholder="Site Link">
                                                    @if($errors->has('sitelink'))
                                                        <div class="error">{{ $errors->first('sitelink') }}</div>
                                                  @endif
                                                </div>
                                            </div>
                                        </div>
                                         <div class="row">
                                        <div class="col-lg-6 col-md-12">
                                            <label for="exampleInputEmail1">Email address</label>
                                            <input type="email" name="email" value="@if(@$settingData->email!==''){{@$settingData->email}}@endif" class="form-control" id="exampleInputEmail1" placeholder="Email address">
                                            @if($errors->has('email'))
                                                        <div class="error">{{ $errors->first('email') }}</div>
                                            @endif
                                        </div>
                                        <div class="col-lg-6 col-md-12">
                                            <label for="exampleInputnumber">Phone</label>
                                            <input type="text" name="number" value="@if(@$settingData->phone!==''){{@$settingData->phone}}@endif" class="form-control" id="exampleInputnumber" placeholder="phone">
                                            @if($errors->has('number'))
                                                        <div class="error">{{ $errors->first('number') }}</div>
                                            @endif
                                        </div>
                                        <div class="col-lg-6 col-md-12">
                                            <label for="exampleInputnumber">Fax</label>
                                            <input type="text" name="fax" value="@if(@$settingData->fax!==''){{@$settingData->fax}}@endif" class="form-control" id="exampleInputnumber" placeholder="Fax">
                                            @if($errors->has('fax'))
                                                        <div class="error">{{ $errors->first('fax') }}</div>
                                            @endif
                                        </div>
                                        <div class="form-group">
                                            <label class="form-label">Address</label>
                                            <textarea name="address" value="@if(@$settingData->address!==''){{@$settingData->address}}@endif" class="form-control" rows="6"placeholder="Enter Address">@if(@$settingData->address!==''){{@$settingData->address}}@endif</textarea>
                                             @if($errors->has('address'))
                                                        <div class="error">{{ $errors->first('address') }}</div>
                                             @endif
                                        </div>
                                    </div>
                                        
                                    </div>
                                    <div class="card-footer text-end">
                                        <button class="btn btn-success my-1" value="submit">Save</button>
                                    </div>
                                </div>                              
                            </div>
                           </form>
                        </div>
                        <!-- ROW-1 CLOSED -->

        @endsection

    @section('scripts')

    <!-- INTERNAL SELECT2 JS -->
    <script src="{{asset('assets/plugins/select2/select2.full.min.js')}}"></script>
    <script src="{{asset('assets/js/select2.js')}}"></script>

    @endsection
