title: Getting Column not found Error at Illuminate\Database\QueryException?
body: <p>I am working in Laravel app and relating <code>users</code> table with <code>posts</code> table by <code>user_id</code> column. I already have <code>user_id</code> column in <code>posts</code> table. But when I run <code>php artisan db:seed</code> command, I get an error :</p>
  <blockquote>
  <p>`SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id ' in 'field list'</p>
  </blockquote>
  <p><strong>Getting below error:</strong></p>
  <pre><code>   Illuminate\Database\QueryException 
  
    SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user_id ' in 'field list' (SQL: insert into `posts` (`user_id `, `title`, `post_image`, `content`, `user_id`, `updated_at`, `created_at`) values (11, Perferendis dolorem eum ex nesciunt., https://lorempixel.com/900/300/?54025, Unde voluptatibus praesentium unde et illum qui quo. Cupiditate pariatur aperiam fugiat perspiciatis. In atque corrupti eius ipsam saepe blanditiis minima., 1, 2020-06-28 08:54:02, 2020-06-28 08:54:02))
  
    at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
      667|         // If an exception occurs when attempting to run a query, we'll format the error
      668|         // message to include the bindings with SQL, which will make this exception a
      669|         // lot more helpful to the developer instead of just the database's errors.
      670|         catch (Exception $e) {
    &gt; 671|             throw new QueryException(
      672|                 $query, $this-&gt;prepareBindings($bindings), $e
      673|             );
      674|         }
      675| 
  
    • A column was not found: You might have forgotten to run your migrations. You can run your migrations using `php artisan migrate`. 
      https://laravel.com/docs/master/migrations#running-migrations
  
        +13 vendor frames 
    14  database/seeds/DatabaseSeeder.php:21
        Illuminate\Database\Eloquent\Relations\HasOneOrMany::save()
  
        +1 vendor frames 
    16  database/seeds/DatabaseSeeder.php:22
        Illuminate\Support\Collection::each()
  
  </code></pre>