@extends ('includes.main-layout')

@section('styles')

@endsection

@section('header')
    @include('includes.header')
@endsection

@section('content')
    <div class="row mt-4">
    @include('includes.errors')
        <div class="col-md-6">
            <img class="card-img-top" height="200" width="150" src="{{URL::to('images/'.$product->file)}}" alt="Produit">
        </div>
        <div class="col-md-6 mt-4">
            <h5 class="card-title">{{$product->name}}</h5>
            <p class="card-text">{{$product->prix}} DH</p>
            <form action="{{route('cart.add')}}" method="post">
                <input type="hidden" name="_token" value="{{csrf_token()}}">
                <div class="qte mb-2">
                    <a href="#" class="btn btn-dark" id="moins">-</a>
                    <input type="text" style="width:8%;text-align:center;padding:5px;" id="qte" name="qte" value="0">
                    <a href="#" class="btn btn-dark" id="plus">+</a>
                    <input type="hidden" name="product_id" value="{{$product->id}}">
                </div>
                <button type="submit" class="btn btn-primary">Ajouter au panier</button>
            </form>
        </div>
    </div>
@endsection

@section('footer')

@endsection

@section('scripts')

@endsection
