@source directive), which is a clean but less conventional approach compared to traditional asset pipelines (e.g., Laravel Mix/Vite). This could introduce build tooling dependencies if not managed carefully.@source directive, which is unconventional and may require:
| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Filament Version Lock | High | Pin exact Filament version in composer.json to avoid breaking changes. |
| CSS Build Tooling | Medium | Test with Laravel Mix/Vite to ensure @source compatibility. Fallback to manual Blade view publishing if needed. |
| Theme Customization | Medium | Document custom theme setup as a pre-requisite in onboarding. |
| Auth View Conflicts | Low | Override Filament’s auth views if needed (e.g., via resources/views/filament/...). |
| Localization | Low | Package lacks i18n support; extend if multilingual auth pages are required. |
Filament Ecosystem Fit:
Theme Strategy:
User Experience:
localStorage) be added? If so, will we implement this via JS or a separate package?Maintenance:
Alternatives:
spatie/laravel-dark-mode) that offer broader Laravel support?@source directive requires a build tool (Laravel Mix, Vite, or Blade’s native support). Test compatibility early.Pre-Integration Setup:
resources/views/auth/).Installation:
composer require awcodes/light-switch
composer.json:
"awcodes/light-switch": "^3.0"
Configuration:
@source directive to your custom theme CSS file (e.g., resources/css/filament/app.css):
@source '../../../../vendor/awcodes/light-switch/resources/**/*.blade.php';
php artisan vendor:publish --tag="light-switch.views"
Testing:
Post-Integration:
| Component | Compatibility Notes |
|---|---|
| Filament v3.x | Works with package v1.x (may require legacy Filament setup). |
| Filament v4.x | Targeted for package v2.x; test with your Filament version. |
| Filament v5.x | Targeted for package v3.x; check for breaking changes. |
| Laravel | No direct Laravel version constraints (inherits Filament’s Laravel compatibility). |
| CSS Frameworks | May conflict with Tailwind/Bootstrap if not scoped properly. |
| JS Frameworks | No JS dependencies, but persistence features may require Alpine.js/Inertia/etc. |
awcodes/light-switch when new versions align with Filament updates.@source directive and build tooling).php artisan vendor:publish --tag="light-switch.views" to inspect published views.@source directive causes slow Blade compilation, consider publishing views manually.users table column).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Filament Major Update | Package breaks | Pin versions; test in staging first. |
| CSS Build Tooling Failure | Theme not loading | Fallback to manual view publishing. |
| Auth View Conflicts | Toggle button missing | Override views or adjust CSS. |
| Missing Custom Theme | Installation fails | Document as pre-requisite. |
| JS Persistence Bug | User preference not saved | Implement fallback (e.g |
How can I help you explore Laravel packages today?