@extends('admin.layouts.app')
@section('content')
<div class="row">
    @include('admin.layouts.errors')

    <div class="col-lg-6">
        <div class="card">
            <div class="card-body">
                <h4 class="card-title">ویرایش ماده</h4>
                <div>
                    <form action="{{ route('volum.update',$volum->id) }}" method="post">
                        @csrf
                        @method('put')
                        <div class="mb-4">
                        <label for="">تایتیل را وارد کنید</label>
                            <input class="form-control" name="title" type="text" placeholder="نام" value="{{$volum->title}}">
                        </div>

                        <div class="mb-4">
                        <label for="">عدد را وارد کنید</label>
                            <input class="form-control" name="number" type="text" placeholder="تعداد" value="{{$volum->number}}">
                        </div>

                        <div class="mb-4">
                            <select class="form-control" name="law_id" id="law_id">
                                @foreach ($laws as $law)
                                <option value="{{$law->id}}" {{ $law->id === $volum->law_id ? 'selected' : '' }}>{{$law->title}}</option>
                                @endforeach
                            </select>
                        </div>
                        <button class="btn btn-primary" type="submit">ثبت</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection