Skip to content

Commit 21f831a

Browse files
authored
Merge pull request #6 from DemianShtepa/fix/change-tags-length-setup-non-nullable-user-select
Fix tags column name length. Set non-nullable user selection for post
2 parents bd4fed7 + 2e166d5 commit 21f831a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Models/Post.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ public static function getForm()
217217
]),
218218
Select::make(config('filamentblog.user.foreign_key'))
219219
->relationship('user', 'name')
220+
->nullable(false)
220221
->default(auth()->id()),
221222

222223
]),

src/Models/Tag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ public static function getForm(): array
3838
))
3939
->unique('tags', 'name', null, 'id')
4040
->required()
41-
->maxLength(155),
41+
->maxLength(50),
4242

4343
TextInput::make('slug')
4444
->unique('tags', 'slug', null, 'id')
4545
->readOnly()
46-
->maxLength(255),
46+
->maxLength(155),
4747
];
4848
}
4949

0 commit comments

Comments
 (0)