title: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'title' in 'field list' in Laravel 5.4
body: <p>Can anyone help me what is the problem of my following data insert code?</p>
  
  <blockquote>
    <p>SQLSTATE[42S22]: Column not found: 1054 Unknown column 'title' in
    'field list' (SQL: insert into  gallery_categories (title,
    description, category_id, image, updated_at, created_at) values (Test
    title, Test details, 1, 1512370315.jpg, 2017-12-04 06:51:55,
    2017-12-04 06:51:55))</p>
  </blockquote>
  
  <p>I have two model. One of GalleryModel and other of GalleryCategoryModel. When I use <code>dd($request-&gt;all());</code> then it debugging perfect.</p>
  
  <p>N.B: I am new in laravel.</p>
  
  <p><strong>GalleryModel Model</strong></p>
  
  <pre><code>class GalleryModel extends Model
      {
          protected $table      = 'galleries';
          protected $primaryKey = 'id';
          protected $fillable   = ['title', 'description', 'image', 'category_id'];
      }
  </code></pre>
  
  <p><strong>And here is my GalleryCategoryModel Model</strong></p>
  
  <pre><code>class GalleryCategoryModel extends Model
      {
          protected $table      = 'gallery_categories';
          protected $primaryKey = 'id';
          protected $fillable   = ['name'];
  
      }
  </code></pre>
  
  <p><strong>My controller GalleriesController</strong></p>
  
  <pre><code>public function create()
      {
          $categories = GalleryCategoryModel::all();
          return view('pages.backend.galleries.create')-&gt;withCategories($categories);
      }
  
  
  public function store(StoreGalleryRequest $request)
      {
          $gallery = new GalleryCategoryModel;
  
          $gallery-&gt;title       = $request-&gt;title;
          $gallery-&gt;description = $request-&gt;description;
          $gallery-&gt;category_id = $request-&gt;category_id;
  
          if($request-&gt;hasFile('gallery_image')){
              $image = $request-&gt;file('gallery_image');
              $filename = time() . '.' .$image-&gt;getClientOriginalExtension();
              $location = public_path('assets/backend/images/' .$filename);
              Image::make($image)-&gt;resize(500, 350)-&gt;save($location);
  
              $gallery-&gt;image = $filename;
          }
          $gallery-&gt;save();
          Session::flash('success', "Data has been insert success");
          return redirect()-&gt;route('galleries.index', $gallery-&gt;id);
      }
  </code></pre>
  
  <p><strong>Here is my HTML code</strong></p>
  
  <pre><code>&lt;div class="br-section-wrapper"&gt;
        &lt;h6 class="tx-gray-800 tx-uppercase tx-bold tx-14 mg-b-10"&gt;Create New Gallery&lt;/h6&gt;
        {!! Form::open(array('route' =&gt; 'galleries.store', 'data-parsley-validate' =&gt; '', 'files' =&gt; true)) !!}
    {{ csrf_field() }}
      &lt;div class="row"&gt;
        &lt;div class="col-md-12"&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-md-4"&gt;
              &lt;div class="form-group margin-top15"&gt;
                &lt;label for="title"&gt;Gallery Title: &lt;span class="tx-danger"&gt;*&lt;/span&gt;&lt;/label&gt;
                &lt;input type="text" name="title" id="title" class="form-control" required&gt;
              &lt;/div&gt;
            &lt;/div&gt;
  
             &lt;div class="col-md-4"&gt;
               &lt;div class="form-group margin-top15"&gt;
                &lt;label for="category_id"&gt;Select Category: &lt;span class="tx-danger"&gt;*&lt;/span&gt;&lt;/label&gt;
                &lt;select class="form-control select2 width-100" name="category_id" id="category_id" data-placeholder="Choose one" data-parsley-class-handler="#slWrapper" data-parsley-errors-container="#slErrorContainer" required&gt;
                    &lt;option label="Choose one"&gt;&lt;/option&gt;
                    @foreach($categories as $category)
                      &lt;option value="{{ $category-&gt;id }}"&gt;{{ $category-&gt;name }}&lt;/option&gt;
                    @endforeach
                  &lt;/select&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-md-4"&gt;
               &lt;div class="form-group margin-top15"&gt;
                &lt;label for="gallery_image"&gt;Gallery Image: &lt;span class="tx-danger"&gt;*&lt;/span&gt;&lt;/label&gt;
                &lt;input type="file" name="gallery_image" id="gallery_image" class="form-control" required&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="row"&gt;
            &lt;div class="col-md-12"&gt;
              &lt;label for="description"&gt;Description: &lt;span class="tx-danger"&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;textarea name="description" id="description" class="form-control"&gt;&lt;/textarea&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group margin-top15"&gt;
            &lt;button type="submit" class="btn btn-info tx-11 pd-y-12 tx-uppercase tx-spacing-2"&gt;Create Gallery&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    {!! Form::close() !!}
  &lt;/div&gt;
  </code></pre>