@extends('layouts.master')
@section('content')
    <section id="page-title" class="page-title page-title-layout4 text-center bg-overlay bg-parallax">
        <div class="bg-img"><img src="/assets/img/page-titles/1.jpg" alt="background"></div>
        <div class="container">
            <div class="row">
                <div class="col-sm-12 col-md-12 col-lg-12 col-xl-8 offset-xl-2">
                    <span class="pagetitle__subheading">Get In Touch</span>
                    <h1 class="pagetitle__heading">Contact Us
                    </h1>
                </div>
            </div>
        </div>
    </section>

    <section id="about2" class="about about-2">
        <div class="container">
            <div class="row">
                <div class="col-12 p-4 shadow rounded">
                    @if ($errors->any())
                        <div class="alert bg-danger">
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                    @if (session()->has('success'))
                        <div class="alert bg-success text-center">{{ session()->get('success') }}</div>
                    @elseif (session()->has('error'))
                        <div class="alert bg-danger text-center">{{ session()->get('error') }}</div>
                    @endif

                    <h3 class="c_inner_title">Send us a message</h3>
                    <form class="contact_us_form" action="{{ route('contact.store') }}" method="post">
                        @csrf
                        <div class="form-group">
                            <input type="text" class="form-control" id="name" name="name"
                                placeholder="Your Name">
                        </div>
                        <div class="form-group">
                            <input type="email" class="form-control" id="email" name="email" placeholder="Email">
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control" id="subject" name="subject" placeholder="Subject">
                        </div>
                        <div class="form-group">
                            <textarea class="form-control" id="message" name="message" placeholder="Message" rows="1"></textarea>
                        </div>
                        <div class="form-group button_area">
                            <button type="submit" value="submit your quote" class="btn btn-primary">Send message</button>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </section>
@endsection
