diff --git a/app/Filament/Resources/Content/ReleaseResource.php b/app/Filament/Resources/Content/ReleaseResource.php new file mode 100644 index 00000000..4096fff0 --- /dev/null +++ b/app/Filament/Resources/Content/ReleaseResource.php @@ -0,0 +1,72 @@ +schema([ + // + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id')->searchable()->sortable(), + ResourceLinkColumn::make('product.title', + fn (Release $record) => route('filament.admin.resources.shop.products.edit', ['record' => $record->product]) + ), + Tables\Columns\TextColumn::make('version')->searchable()->sortable(), + BooleanColumn::make('released'), + Tables\Columns\TextColumn::make('released_at')->dateTime()->sortable(), + ]) + ->filters([ + // + ]) + ->actions([ + Tables\Actions\EditAction::make(), + ]) + ->bulkActions([ + Tables\Actions\BulkActionGroup::make([ + Tables\Actions\DeleteBulkAction::make(), + ]), + ]); + } + + public static function getRelations(): array + { + return [ + // + ]; + } + + public static function getPages(): array + { + return [ + 'index' => Pages\ListReleases::route('/'), + 'create' => Pages\CreateRelease::route('/create'), + 'edit' => Pages\EditRelease::route('/{record}/edit'), + ]; + } +} diff --git a/app/Filament/Resources/Content/ReleaseResource/Pages/CreateRelease.php b/app/Filament/Resources/Content/ReleaseResource/Pages/CreateRelease.php new file mode 100644 index 00000000..e7094d31 --- /dev/null +++ b/app/Filament/Resources/Content/ReleaseResource/Pages/CreateRelease.php @@ -0,0 +1,12 @@ +