Skip to content

Commit bf85e7f

Browse files
committed
Bug Fixes
1 parent 4ed7d84 commit bf85e7f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Commands/Bases/ControllerCommandBase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,8 @@ protected function getCommandInput()
204204
'modelName',
205205
'prefix',
206206
'perPage',
207-
'fileSnippet',
208207
'modelDirectory',
209208
'langFile',
210-
'fields',
211209
'withFormRequest',
212210
'formRequestName',
213211
'force',

src/Support/FieldOptimizer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected function optimizeStringField()
9999
*/
100100
protected function optimizeRequiredField()
101101
{
102-
if (!array_key_exists('is-nullable', $this->meta) && ($this->parser->isNullable() || !$this->parser->isRequired() || $this->parser->isConditionalRequired())) {
102+
if (!array_key_exists('is-nullable', $this->meta) && !$this->field->isPrimary() && ($this->parser->isNullable() || !$this->parser->isRequired() || $this->parser->isConditionalRequired())) {
103103
$this->field->isNullable = true;
104104
}
105105

@@ -209,6 +209,9 @@ protected function optimizeBoolean()
209209
protected function optimizePrimaryKey()
210210
{
211211
if ($this->field->isPrimary()) {
212+
213+
$this->field->isNullable = false;
214+
212215
if ($this->meta == null) {
213216
$this->field->isOnFormView = false;
214217
$this->field->isOnIndexView = false;

0 commit comments

Comments
 (0)