RepositoryBladeATÁo
bezhanSalleh

bezhanSalleh/filament-panel-switch

The Panel Switch Plugin for Filament offers a robust and customizable component for switching between panels in applications built with FilamentPHP.

165sao
31fork
0issue
0lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Blade

#1 Repository Của Ngày

🔀 Panel Switch — Chuyển panel Filament nhanh gọn, tùy biến sâu

Plugin nhẹ cho Filament 4.x/5.x thêm component chuyển panel vào header, tự lọc theo quyền user, 2 style giao diện, cấu hình đầy đủ qua fluent API.

filament-panel-switch của bezhanSalleh giải quyết bài toán phổ biến khi xây dựng ứng dụng multi-panel với FilamentPHP: admin, developer, customer portal… mỗi vai trò thấy panel khác nhau. Thay vì hard-code dropdown hay viết custom component, package này tích hợp sẵn vào header Filament, chỉ hiện panel mà user có quyền truy cập (dựa trên canAccessPanel của User model), và cho dev kiểm soát mọi chi tiết hiển thị qua API fluent.

✨ Điểm nổi bật

  • Tự động theo quyền: Chỉ hiển thị panel khi user có quyền truy cập ≥ 2 panel, không cần config thêm.
  • Hai style giao diện: Modern (mặc định) dùng Modal Blade component của Filament, có slide-over; Simple kiểu dropdown tối giản.
  • Fluent configuration: modalHeading(), modalWidth(), slideOver(), panels([...]), labels(), icons(), sortOrder(), placement() — tất cả chainable.
  • Dynamic panels: panels() chấp nhận closure trả về mảng panel ID, hữu ích cho logic phân quyền phức tạp.
  • Validate panel ID: Ném InvalidArgumentException nếu panel khai báo không tồn tại trong Filament.
  • Theme-ready: Yêu cầu thêm @source vào theme.css và npm run build — tuân thủ theming chuẩn Filament.
  • Hỗ trợ Filament 4.x & 5.x: Version 2.x/3.x cùng兼容 hai major version hiện tại.

💡 Vì sao đáng chú ý

Package tập trung làm một việc và làm tốt: chuyển panel. Không kéo dependency thừa, không ép buộc opinionated UI — dev chọn Modern hay Simple, modal hay slide-over, width sm/md/lg, vị trí left/right, icon Heroicons hay custom Blade component. Logic lọc panel theo canAccessPanel tận dụng sẵn authorization của Filament, tránh duplicate permission logic. Closure trong panels() cho phép quyết định runtime (ví dụ: chỉ hiện panel dev khi app()->environment('local')). Gọn, an toàn, dễ mở rộng — đúng chất "Filament way".


#FilamentPHP #FilamentPlugin #AdminPanel #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPHP
CodeWithDennis/filament-select-tree

The multi-level select field lets you pick one or multiple options from a list that is neatly organized into different levels.

330
Oct 15, 2026
RepositoryPHP
tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

148
Oct 15, 2026
RepositoryPHP
datlechin/filament-menu-builder

Create and manage menu in your Filament app.

144
Oct 17, 2026
RepositoryBlade
CodeWithDennis/filament-advanced-choice

This package introduces eight new form fields for FilamentPHP. Four of them are based on Radio, and four are based on CheckboxList.

120
Aug 4, 2026
RepositoryPHP
leandrocfe/filament-apex-charts

Apex Charts integration for Filament PHP.

501
Oct 18, 2026
RepositoryPHP
mokhosh/filament-kanban

Add kanban boards to your Filament pages

464
Jun 22, 2026
RepositoryPHP
awcodes/filament-curator

A media picker plugin for Filament Panels.

441
Oct 19, 2026
RepositoryPHP
relaticle/flowforge

Laravel Kanban boards with intelligent pagination, drag-and-drop ordering, and flexible integration patterns for Filament and Livewire applications.

422
Oct 18, 2026
RepositoryPHP
awcodes/filament-tiptap-editor

A Rich Text Editor plugin for Filament Forms.

409
Jul 21, 2026