@extends('admin.layout.master')
@section('main-content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            Create Media
            <small>All * field required</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Forms</a></li>
            <li class="active">Advanced Elements</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">

        <!-- SELECT2 EXAMPLE -->
        <!-- form start -->
        <form name="addMedia" id="addMedia" method="post" action="/admin/media">
            @csrf
            <div class="box box-primary">
                <!-- /.box-header -->
                <div class="box-body">
                    <!-- row start -->
                    <div class="row">
                        <div class="col-xs-6">

                            <div class="form-group {{ $errors->has('title') ? 'has-error' : NULL }}">
                                <label for="title">Title <span class="text text-red">*</span></label>
                                <input type="text" name="title" value="{{ old('title')}}" class="form-control" id="title" placeholder="Author Name">
                      <span class="text-danger">{{ $errors->first('title') }}</span>
                            
                            </div>

                            <div class="form-group {{ $errors->has('slug') ? 'has-error' : NULL }}">
                                <label for="slug">Slug <span class="text text-red">*</span></label>
                                <input type="text" name="slug" value="{{ old('slug')}}" class="form-control" id="slug" placeholder="Slug">
                      <span class="text-danger">{{ $errors->first('slug') }}</span>
                            </div>
                            <div class="form-group">
                                <label>Media Type <span class="text text-red">*</span></label>
                                <select class="form-control" name="media_type" style="width: 100%;">
                                    <option id="none">-- Select Media Type --</option>
                                    <option id="slider">Slider</option>
                                    <option id="gallery">Gallery</option>
                                </select>
                            </div>
                        </div>

                        <div class="col-xs-6">
                            <div class="form-group {{ $errors->has('media_img') ? 'has-error' : NULL }}">
                                <label for="media_img">Media Image <span class="text text-red">*</span></label>
                                <input type="file" name="media_img" class="form-control" id="media_img" placeholder="Media Image">
                      <span class="text-danger">{{ $errors->first('media_img') }}</span>
                            
                            </div>
                            <div class="form-group">
                                <label>Description</label>
                                <textarea class="form-control" name="descp" rows="5" placeholder="Enter description..."></textarea>
                            </div>
                        </div>
                    </div>

                    <!-- row end -->

                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="submit" class="btn btn-primary">Submit</button>
                    <button type="submit" class="btn btn-danger">Cancel</button>
                </div>
            </div>
            <!-- /.box -->
        </form>
        <!-- form end -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
@endsection