@extends('yonetim.yonetim_master')

@section('main')
    <section class="section">
        <div class="section-body">
            <div class="row">
                <div class="col-12 col-md-9 col-lg-9">


                    <div class="card">



                        <form action="{{route('indexkategoriler.veriupdateson',$veriler->id)}}" method="post" enctype="multipart/form-data">
                            @csrf
                            <div class="card-body">
                                <div class="col-lg-12 mx-auto">

                                    <a href="{{route('indexkategoriler.all')}}" class="btn btn-success float-right"><i class="fa fa-backward"></i> Geri Dön</a>
                                    <br>

                                    <div style="margin-bottom: 10px" class="form-group">

                                        <img style="height: 150px" src="{{asset($veriler->resimyol)}}">
                                        <p style="padding: 0;margin: 0">Güncel Resim</p>
                                        <input type="hidden" name="eskiresimyol" value="{{$veriler->resimyol}}">
                                    </div>

                                    <div class="form-group">
                                        <label>Resim Yükle(120px genişlik 70px yüksekliğinde yükle)</label>
                                        <input name="resimyol" class="form-control" type="file">


                                    </div>


                                    <div class="form-group">
                                        <label>Başlık</label>
                                        <input name="baslik" type="text" class="form-control" value="{{$veriler->baslik}}">
                                    </div>




                                    <div class="form-group">
                                        <label> Kategori</label>






                                            <select class="form-control" name="kategori_id">


                                                @foreach($paketkategori as $kat)
                                                    @if($veriler->kategori_id==$kat->id)
                                                        <option selected value="{{$kat->id}}">{{$kat->baslik}}</option>

                                                    @else
                                                        <option value="{{$kat->id}}">{{$kat->baslik}}</option>

                                                    @endif


                                                @endforeach
                                            </select>


                                    </div>





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

                                    </div>


                                </div>
                            </div>

                        </form>


                    </div>





                </div>

            </div>

        </div>
    </section>
@endsection
