diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c75316..6ae875e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ All notable changes to this project will be documented in this file. ### Fixed - Fix recursively searching for `HasFactory` and `Macroable` traits [\#1216 / daniel-de-wit](https://github.com/barryvdh/laravel-ide-helper/pull/1216) +### Fixed +- Use platformName to determine db type when casting boolean types [\#1212 / stockalexander](https://github.com/barryvdh/laravel-ide-helper/pull/1212) + 2021-04-09, 2.10.0 ------------------ ### Added diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 12fe8b9..3f3cd31 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -463,7 +463,7 @@ class ModelsCommand extends Command $type = 'integer'; break; case 'boolean': - switch (config('database.default')) { + switch ($platformName) { case 'sqlite': case 'mysql': $type = 'integer';