diff --git a/src/RequiredFields.php b/src/RequiredFields.php index 8dc8523..4eb68c1 100644 --- a/src/RequiredFields.php +++ b/src/RequiredFields.php @@ -152,7 +152,7 @@ private static function getRequiredFieldsForMysqlAndMariaDb( return (array) $column; }, $queryResult); - if(!$withNullables){ + if($withNullables){ dump($queryResult); // todo remove it later } @@ -160,7 +160,7 @@ private static function getRequiredFieldsForMysqlAndMariaDb( ->reject(function ($column) use ($withNullables, $withDefaults, $withPrimaryKey) { return $column['primary'] && !$withPrimaryKey || $column['default'] != null && !$withDefaults - || $column['nullable'] == 1 && !$withNullables; + || $column['nullable'] && !$withNullables; }) ->pluck('name') ->toArray();