@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-10">


                    <div class="card">



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






                                <div class="col-lg-12 mx-auto">

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

                                    <p class="text-danger">*1400px genişliğinde 200px yükseliğinde resim yükleyiniz. Dikdörtgen biçiminde resim yüklemeniz gerekli </p>

                                    @if ($errors->any())
                                        <div class="alert alert-danger">
                                            <ul style="padding: 0;margin: 0">
                                                @foreach ($errors->all() as $error)
                                                    <li>{{ $error }}</li>
                                                @endforeach
                                            </ul>
                                        </div>
                                    @endif

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

                                        <img style="width: 100%;height: 100px" 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</label>
                                        <input name="resimyol" required class="form-control" type="file">
                                    </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
