Skip to content

Commit

Permalink
add collection id
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Sep 30, 2024
1 parent 1bb2f71 commit 830bb38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/Models/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Carbon\Carbon;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
Expand Down Expand Up @@ -38,6 +39,11 @@ public static function getForm(): array
->columns(1)
->schema([
TextInput::make('title')->required(),
Select::make('collection_id')
->searchable()
->preload()
->relationship(name: 'collection', titleAttribute: 'name')
->label('Collection'),
TextInput::make('description')->required(),
TextInput::make('location'),
]),
Expand All @@ -46,8 +52,12 @@ public static function getForm(): array

->columns(2)
->schema([
DateTimePicker::make('start_date')->required(),
DateTimePicker::make('end_date')->required(),
DateTimePicker::make('start_date')
->native(false)
->required(),
DateTimePicker::make('end_date')
->native(false)
->required(),
]),
];
}
Expand Down
Binary file modified tests/fixtures/.DS_Store
Binary file not shown.

0 comments on commit 830bb38

Please sign in to comment.