asignua/filament-redirects
Asignua Filament Redirects is a Filament plugin for managing URL redirects directly from your admin panel. Create and edit 301/302 redirects, handle incoming requests with middleware, and keep your Laravel site's links organized without leaving Filament.
Architecture fit: This package is a Laravel-native redirect management solution that integrates via Eloquent models, middleware, caching, and an optional admin panel. It fits Laravel applications that need SEO-friendly redirects, 404 logging, and multilingual path handling. The use of afterCommit for cache invalidation indicates awareness of transactional integrity, which is important for apps that wrap redirect creation in database transactions. The package appears to store redirects in a database table (redirects) and resolves them at request time, likely with a cache layer for performance.
Integration feasibility: Installation is straightforward via Composer, with published migrations and configuration. The package includes a UI panel (modals, bulk creation, recheck) and Artisan commands (redirects:recheck), suggesting both developer and content-editor workflows. The v1.0.2 release fixes several edge cases around path normalization, percent-encoding, language prefixes, and entity binding—these are signs of a maturing codebase rather than a greenfield package. Integration effort is moderate: register middleware, configure caching, and optionally expose the admin panel.
Technical risk: The patch release addresses correctness bugs that could have caused redirect loops, stale cache entries, incorrect language routing, and SQL errors on long paths. While these fixes reduce risk, the sheer number of edge cases (encoding, whitespace, query strings, fragments, language prefixes, transaction boundaries) indicates inherent complexity. Teams should expect to test path normalization and multilingual scenarios thoroughly. No breaking changes are noted in v1.0.2, but the package is still at v1.x, so API stability is not guaranteed.
Key questions:
afterCommit.)afterCommit behavior?Stack fit: The package is designed for Laravel applications and assumes standard Laravel components (Eloquent, middleware, service provider, config). It should fit any Laravel 8+ project using MySQL, PostgreSQL, or SQLite. The language-prefix handling suggests suitability for multilingual sites, but the bulk creation constraint (rows must share one language) means editorial workflows need to account for language grouping.
Migration path: For a new adoption, install via Composer, publish migrations and config, run migrations, and register the middleware. If replacing an existing redirect solution (e.g., .htaccess rules, another package, or custom code), export existing redirects and import them into the redirects table—paying attention to path normalization (the package normalizes on save). Enable 404 logging in a staging environment first to validate behavior, then promote to production. For existing users of v1.0.0/v1.0.1, v1.0.2 is a patch release; update via Composer and run the test suite, focusing on transaction-wrapped redirect creation and multilingual paths.
Compatibility: Confirm Laravel version constraints in composer.json. The afterCommit usage requires Laravel 8.0+. The package’s cache invalidation relies on model events, so any custom code that bypasses Eloquent (e.g., raw SQL inserts) will not flush the cache. The admin panel may require additional frontend dependencies (Blade, Livewire, or similar)—verify publishable assets and authorization integration.
Sequencing:
?, #, language prefixes, percent-encoded targets).Maintenance: The package is actively maintained (v1.0.2 patch release with numerous fixes). Expect periodic patch releases for edge cases; establish a cadence to review release notes and test upgrades in staging. The complexity of path normalization and multilingual routing means upgrades should include regression tests for redirect resolution, cache flushing after transactions, and 404 log workflows.
Support: Check the package’s GitHub repository for issue activity, documentation quality, and community support. The release notes reference internal docs (boost guideline, resolver docblock), suggesting reasonable documentation. However, the niche edge cases may require reading source code or filing issues. A TPM should identify an internal owner for redirect configuration and troubleshooting.
Scaling: Redirect resolution is likely cached, so read performance should scale well. The 404 log can grow unbounded; the panel’s “Recheck” now limits to the 2000 most recent rows, but the CLI command walks the entire log—plan for log pruning or archival. Bulk creation and recheck operations may be memory-intensive; test with production-sized datasets. Database size for the redirects table is modest (path + target + metadata), but ensure indexes on old_path (length 191) and language columns for lookup performance.
Failure modes:
?, #, %3F) should be tested.redirects.gone_status is configured (default 410) and that content editors understand “Gone” does not require a target.Ramp-up: Laravel developers can integrate the package in hours. Content editors need a short training session on the admin panel, focusing on bulk creation (same-language constraint), “Gone” handling, and the 404 log’s non-global search. TPMs should document the redirect normalization behavior (e.g., en/foo vs. /en/foo) and the transaction/cache interaction for backend teams. Expect a 1–2 day ramp-up for a small team, plus additional time for edge-case testing in multilingual sites.
How can I help you explore Laravel packages today?