@extends('layouts.v_template')
@section('content')
    <div class="container-fluid">
        <!-- ========== title-wrapper start ========== -->
        <div class="title-wrapper pt-30">
            <div class="row align-items-center">
                <div class="col-md-6">
                    <div class="title">
                        <h2>Materi</h2>
                    </div>
                </div>
                <!-- end col -->
                <div class="col-md-6">
                    <div class="breadcrumb-wrapper">
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item">
                                    <a href="#0">Materi</a>
                                </li>
                                <li class="breadcrumb-item">
                                    <a href="{{ URL::to('/materi-admin') }}">Dashboard</a>
                                </li>
                            </ol>
                        </nav>
                    </div>
                </div>
                <!-- end col -->
            </div>
            <!-- end row -->
        </div>
        <!-- ========== title-wrapper end ========== -->
        <div class="tables-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <div class="card-style mb-30">
                        <div class="d-flex justify-content-between mb-15">
                            <h6 class="mb-25">Materi</h6>
                            <a href="{{ URL::to('/materi-admin') }}" class="btn btn-sm btn-primary">Kembali</a>
                        </div>
                        <form action="{{ url('/materi/store') }}" method="POST" enctype="multipart/form-data">

                            @csrf

                            <div class="select-style-1 w-50">
                                <label for="">kategori</label>
                                <div class="select-position">
                                    <select name="kategori">
                                        @foreach ($kategori as $p)
                                            <option value="{{ $p->id }}">{{ $p->nama_kategori }}</option>
                                        @endforeach
                                    </select>
                                </div>
                            </div>



                            <div class="input-style-1">
                                <label>
                                    Judul
                                </label>
                                <input type="text" id="title" name="title" required />

                            </div>



                            <div class="input-style-1">
                                <label>
                                    Deskripsi
                                </label>
                                <textarea rows="10" id="description" name="description"></textarea>

                            </div>

                            <div class="select-style-1">
                                <label for="">Kasus</label>
                                <div class="select-position">
                                    <select name="case">
                                        @foreach ($case as $p)
                                            <option value="{{ $p->id }}">{{ $p->title }}</option>
                                        @endforeach
                                    </select>
                                </div>
                            </div>



                            <div class="input-style-1">
                                <label>
                                    File
                                </label>
                                <input type="file" name="file" accept="application/pdf">

                            </div>

                            <div class="input-style-1">
                                <label>
                                    Url Youtube
                                </label>
                                <input type="text" name="video" />

                            </div>

                            <button type="submit" class="main-btn primary-btn btn-hover">
                                Simpan
                            </button>

                        </form>
                    </div>
                    <!-- end card -->
                </div>
                <!-- end col -->
            </div>
            <!-- end row -->
        </div>
        <!-- end row -->
    </div>
@endsection

@section('script')
    <script>

    </script>
@endsection

<!-- ========== section end ========== -->

<!-- ========== footer start =========== -->