title: SQLSTATE[42S22]: Column not found: 1054 Unknown column ' name' in 'where clause'
body: <p>I have some code producing the following error. How can I fix it?</p>
  
  <pre><code> "SQLSTATE[42S22]: Column not found: 1054 Unknown column ' name' in 'where clause' (SQL: select count(*) as aggregate from `authors` where ` name` = Azzario Razy Junaidi and `id` &lt;&gt; 4)"
  </code></pre>
  
  <hr>
  
  <pre><code>AuthorsController.php
  public function update(Request $request, $id)
  {
      $this-&gt;validate($request, ['name' =&gt; 'required|unique:authors, name,'.$id]);
      $author = Author::find($id);
      $author-&gt;update($request-&gt;only('name'));
      Session::flash("flash_notification", [
        "level" =&gt; "success",
        "message" =&gt; "Berhasil menyimpan $author-&gt;name"
      ]);
      return redirect()-&gt;route('authors.edit');
  }
  </code></pre>