File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 6
6
use Carbon \Carbon ;
7
7
use Filament \Forms \Components \DateTimePicker ;
8
8
use Filament \Forms \Components \Section ;
9
+ use Filament \Forms \Components \Select ;
9
10
use Filament \Forms \Components \TextInput ;
10
11
use Illuminate \Database \Eloquent \Factories \HasFactory ;
11
12
use Illuminate \Database \Eloquent \Model ;
@@ -38,6 +39,11 @@ public static function getForm(): array
38
39
->columns (1 )
39
40
->schema ([
40
41
TextInput::make ('title ' )->required (),
42
+ Select::make ('collection_id ' )
43
+ ->searchable ()
44
+ ->preload ()
45
+ ->relationship (name: 'collection ' , titleAttribute: 'name ' )
46
+ ->label ('Collection ' ),
41
47
TextInput::make ('description ' )->required (),
42
48
TextInput::make ('location ' ),
43
49
]),
@@ -46,8 +52,12 @@ public static function getForm(): array
46
52
47
53
->columns (2 )
48
54
->schema ([
49
- DateTimePicker::make ('start_date ' )->required (),
50
- DateTimePicker::make ('end_date ' )->required (),
55
+ DateTimePicker::make ('start_date ' )
56
+ ->native (false )
57
+ ->required (),
58
+ DateTimePicker::make ('end_date ' )
59
+ ->native (false )
60
+ ->required (),
51
61
]),
52
62
];
53
63
}
You can’t perform that action at this time.
0 commit comments