Skip to content

Instantly share code, notes, and snippets.

@fhulufhelo
Last active December 10, 2019 08:17
Show Gist options
  • Save fhulufhelo/74732f548e7636cc7f63b55f21d2812c to your computer and use it in GitHub Desktop.
Save fhulufhelo/74732f548e7636cc7f63b55f21d2812c to your computer and use it in GitHub Desktop.
Environment Homestead
Clone repo
cd repo
mv .env.example .env
php artisan key:generate
php artisan serve
//ERROR
php artisan db:seed
Class BooksTableSeeder does not exist
Class 'App\Imports\ImportCsv' not found
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for co
lumn 'publication_year' at row 1 (SQL: insert into `books` (`title`, `origi
nal_title`, `publication_year`, `isbn`, `language_code`, `image`, `thumbnai
l`, `avarage_rating`, `total_ratings`, `updated_at`, `created_at`) values (
The First World War, The First World War, 1998.0, 31, , https://images.gr-a
ssets.com/books/1403194704m/8914.jpg, https://images.gr-assets.com/books/14
03194704s/8914.jpg, 117, 345, 2019-12-10 07:18:56, 2019-12-10 07:18:56))
In Connection.php line 458:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for co
lumn 'publication_year' at row 1
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for co
lumn 'avarage_rating' at row 1 (SQL: insert into `books` (`title`, `origina
l_title`, `publication_year`, `isbn`, `language_code`, `image`, `thumbnail`
, `avarage_rating`, `total_ratings`, `updated_at`, `created_at`) values (Th
e Hunger Games (The Hunger Games, #1), The Hunger Games, 2008, 272, eng, ht
tps://images.gr-assets.com/books/1447303603m/2767052.jpg, https://images.gr
-assets.com/books/1447303603s/2767052.jpg, 66715, 127936, 2019-12-10 08:14:
39, 2019-12-10 08:14:39))
In Connection.php line 458:
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for co
lumn 'avarage_rating' at row 1
change from SmallInteger to $table->integer('avarage_rating');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment