KnowledgeRelationManagement.php 793 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Filament\Pages;
  3. use App\Services\KnowledgeGraphService;
  4. use Filament\Pages\Page;
  5. class KnowledgeRelationManagement extends Page
  6. {
  7. protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-link';
  8. protected static string|\UnitEnum|null $navigationGroup = null;
  9. protected static ?int $navigationSort = 2;
  10. protected static bool $shouldRegisterNavigation = false;
  11. protected static ?string $navigationLabel = '关联关系管理';
  12. protected static ?string $title = '关联关系管理';
  13. protected string $view = 'filament.pages.knowledge-relation-management';
  14. public array $relations = [];
  15. public function mount(KnowledgeGraphService $service): void
  16. {
  17. $this->relations = $service->listRelations(1, 1000);
  18. }
  19. }