@extends('yonetim.yonetim_master')

@section('main')
    <section class="section">
        <div class="section-body">
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <div class="card-header">
                            <h4>Domain Verileri</h4>
                            <a href="{{route('domain.veriekle')}}" class="btn btn-primary text-white">Domain Ekle</a>
                            <br>



                        </div>
                        <div class="card-body">

                            <form method="post" action="{{route('genelayar.domaindurum')}}">
                                @csrf



                                <div class="form-group">
                                    <label>Script Detayında Domain Alanını Göster </label>
                                    <select class="form-control" name="domain_durum">
                                        @if($sabitalanlar->domain_durum==0)
                                            <option value="0">Pasif</option>
                                            <option value="1">Aktif</option>
                                        @else
                                            <option value="1">Aktif</option>
                                            <option value="0">Pasif</option>
                                        @endif


                                    </select>
                                </div>
                                <div class="card-footer text-right">
                                    <button type="submit" name="genelayarkaydet" class="btn btn-primary">Güncelle</button>
                                </div>
                            </form>

                            <div class="table-responsive">
                                <table class="table table-striped" id="table-1">
                                    <thead>
                                    <tr>

                                        <th>Başlık</th>
                                        <th>Fiyat</th>


                                        <th>İşlemler</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    @foreach($veriler as $veri)
                                        <tr>

                                            <td>{{$veri->baslik}}</td>
                                            <td>{{$veri->fiyat}}</td>

                                            <td>
                                                <a href="{{ route('domain.veriupdate',$veri->id)}}" class="btn btn-warning"><i class="fa fa-edit"></i> Düzenle</a>

                                                <a onclick="return confirm('Silmek istediğinizden emin misiniz?')" href="{{ route('domain.verisil',$veri->id)}}" class="btn btn-danger"><i class="fa fa-edit"></i> Sil</a>
                                            </td>
                                        </tr>
                                    @endforeach





                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>




        </div>
    </section>
@endsection
