@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="card">
            <h5 class="card-header">Edit Order</h5>
            @include('messages')
            <div class="card-body">

                <form action="/orders/{{ $order->id }}" method="POST">
                    @csrf
                    @method('PUT')
                    <div class="mb-3">
                        <label class="form-label">Company</label>
                        <input type="text" name="company" class="form-control" value="{{ $order->company }}">
                        <label class="form-label">Name</label>
                        <input type="text" name="name" class="form-control" value="{{ $order->name }}">
                        <label class="form-label">phone</label>
                        <input type="text" name="phone" class="form-control" value="{{ $order->phone }}">
                        <label class="form-label">Description</label>
                        <textarea class="form-control" name="description">{{ $order->description }}</textarea>
                        <!--input type="text" name="description" class="form-control" value="{ $order->description }"-->
                        <label class="form-label">Due Date</label>
                        <input type="date" name="due_date" class="form-control" value="{{ $order->due_date }}">
                    </div>
                    <div class="mb-3">
                        <button type="submit" class="btn btn-success">Submit</button>
                        <a href="/orders" class="btn btn-success">Back to Orders</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
@endsection
