@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('branch.store') }}" method="post">
                        @csrf
                        <div class="mb-4">
                            <label for="">تایتل را وارد کنید</label>
                            <textarea class="form-control" name="title" id="title" cols="30" rows="10"></textarea>
                        </div>

                        <div class="mb-4">
                        <label for="">عدد را وارد کنید</label>

                            <input class="form-control" name="number" type="number" placeholder="تعداد">
                        </div>


                        <div class="mb-4">
                            <label for="chapter_id">division</label>
                            <select class="form-control" name="division_id" id="division_id">
                                <option value="">بدون مقدار</option>

                                @foreach ($divisions as $chapter)
                                <option value="{{$chapter->id}}">{{$chapter->title}}</option>
                                @endforeach
                            </select>
                        </div>


                        <div class="mb-4">
                            <label for="chapter_id">chapter</label>
                            <select class="form-control" name="chapter_id" id="chapter_id">
                                <option value="">بدون مقدار</option>

                                @foreach ($chapters as $chapter)
                                <option value="{{$chapter->id}}">{{$chapter->title}}</option>
                                @endforeach
                            </select>
                        </div>

                        <div class="mb-4">
                            <label for="chapter_id">sections</label>
                            <select class="form-control" name="section_id" id="section_id">
                                <option value="">بدون مقدار</option>

                                @foreach ($sections as $section)
                                <option value="{{$section->id}}">{{$section->title}}</option>
                                @endforeach
                            </select>
                        </div>


                        <div class="mb-4">
                            <label for="volum_id">part</label>
                            <select class="form-control" name="part_id" id="part_id">
                                <option value="">بدون مقدار</option>

                                @foreach ($parts as $part)
                                <option value="{{$part->id}}">{{$part->title}}</option>
                                @endforeach
                            </select>
                        </div>

                        <div class="mb-4">
                            <label for="volum_id">gate</label>
                            <select class="form-control" name="gate_id" id="gate_id">
                            <option value="">بدون مقدار</option>
   
                            @foreach ($gates as $gate)
                                <option value="{{$gate->id}}">{{$gate->title}}</option>
                                @endforeach
                            </select>
                        </div>

                        <div class="mb-4">
                            <label for="volum_id">book</label>
                            <select class="form-control" name="book_id" id="book_id">
                                <option value="">بدون مقدار</option>

                                @foreach ($books as $book)
                                <option value="{{$book->id}}">{{$book->title}}</option>
                                @endforeach
                            </select>
                        </div>

                        <div class="mb-4">
                            <label for="volum_id">volum</label>
                            <select class="form-control" name="volum_id" id="volum_id">
                                @foreach ($volums as $volum)
                                <option value="{{$volum->id}}">{{$volum->title}}</option>
                                @endforeach
                            </select>
                        </div>

                        <div class="mb-4">
                            <label for="volum_id">law</label>
                            <select class="form-control" name="law_id" id="law_id">
                                @foreach ($laws as $law)
                                <option value="{{$law->id}}">{{$law->title}}</option>
                                @endforeach
                            </select>
                        </div>


                        <button class="btn btn-primary" type="submit">Submit</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection