I have this in my blade: 

```
<div class="row">
                        <div class="col-sm-6">
                                <label for="name">Name</label>
                                <input class="form-control" type="text" id="name" name="name">
                        </div>
                        <div class="col-sm-6">
                                <label for="slug">Slug</label>
                                <input class="form-control" type="text" id="slug" name="slug"> 
                        </div>
                    </div>
                    <br>
                    <div class="row">
                        <div class="col-sm-6">
                            <label for="item_type">Item Type</label>
                                <select class="form-control" id="item_type" name="item_type">
                                    <option value="physical-goods">Physical Goods</option>
                                    <option value="digital-downloads">Digital Downloads</option>
                                    <option value="credits">Credits</option>
                                </select>
                        </div>
                        <div class="col-sm-6">
                            <label for="order_mode">Order Mode</label>
                                <select class="form-control" id="order_mode" name="order_mode">
                                    <option value="fcfs">First Come, First Serve</option>
                                    <option value="pre-selling">Pre-Selling</option>
                                    <option value="purchase-order">Purchase Order</option>
                                </select>
                        </div>
                    </div>
                    <br>
                    <div>
                        <label for="short_description">Short Description</label>
                        <textarea class="form-control" id="short_description" rows="2"></textarea>
                    </div>
                    <br>
                    <div>
                        <label for="description">Description</label>
                        <textarea class="form-control" id="description" rows="3"></textarea>
                    </div>

```

and I have this in my ProductsController@Store:

```
            $product = Product::firstorCreate([
            'name' => $request->input('name'),
            'slug' => $request->input('slug'),
            'item_type' => $request->get('item_type'),
            'order_mode' => $request->get('order_mode'),
            'short_description' => $request->input('short_description'),
            'description' => $request->input('description')
        ]);

```

my validation:

```
        $this->validate($request, [
        'name'              => '',
        'slug'              => '',
        'item_type'         => 'required',
        'order_mode'        => 'required',
        'short_description' => '',
        'description'       => ''
    ]);

```

and I get the error that name and slug is required but I typed something in the name and slug inputs.
When I tried to remove the require field, I got an error and it showed that all my inputs: name, slug, short description, and description are all blank. I have checked my blade and their name checks out so why is this happening?

EDIT:
now I have this error:

> 
> SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
>  '' for key 'products\_slug\_unique' (SQL: insert into `products`
>  (`name`, `slug`, `store_id`, `item_type`, `order_mode`,
>  `short_description`, `description`, `created_by_id`, `uuid`,
>  `updated_at`, `created_at`) values (, ,
>  36bf3d40-8cb7-11e8-9f9e-5b6a2e94b49b, physical-goods, fcfs,
>  dfgdfgdfgdd, dfgdgdfgdfgdf, 36bc6160-8cb7-11e8-9381-8b8110d8adde,
>  4ba43e00-aaa2-11e8-ae40-8983e976b812, 2018-08-28 09:11:06, 2018-08-28
>  09:11:06))
> 
> 
> 

because when I try to save, the name and slug is not required thus it is saved in the database, but the problem is, there is nothing saved. it is blank. so when I try to save again then it will give me this error because slug is unique