rayzenai/url-manager
Laravel package to manage URLs, redirects, SEO metadata, visit tracking, and XML sitemaps, with redirect-loop protection and automatic old→new slug redirects. Includes Filament 4 admin panel integration (UrlInput) and optional media SEO via file-manager.
HasUrl trait and UrlManager facade align with Laravel's conventions (e.g., model traits, facades).file-manager for media SEO), allowing selective adoption based on project needs.HandleUrlRedirects middleware must be prepended to the web middleware stack to intercept 404s before route resolution. This is non-trivial and requires careful testing to avoid conflicts with other middleware (e.g., auth, localization).urls, url_visits, google_search_console_settings), which must be migrated into existing databases. Schema changes (e.g., adding view_count columns) may require backward-compatible migrations.HasUrl trait and its methods (webUrlPath(), ogTags(), etc.). This may require refactoring legacy models.Middleware Conflicts:
HandleUrlRedirects interact with other middleware (e.g., auth, localization, caching)? Are there edge cases where redirects fail silently?/admin/*) might incorrectly redirect users if not excluded.Scalability:
Model Migration:
HasUrl to existing models without downtime?SEO Impact:
Maintenance:
Analytics:
Fallbacks:
Assessment Phase:
HasUrl (e.g., Product, BlogPost).RouteServiceProvider) to plan middleware integration.Pilot Implementation:
BlogPost) to test HasUrl and Filament integration.Full Rollout:
HasUrl to core models (e.g., Product, Category).Optimization:
HandleUrlRedirects middleware must be tested with:
/admin routes should not redirect)./en/* vs /fr/*)./about) must be added to config/url-manager.php for sitemap inclusion./products/old-slug) must be mapped to new slugs to avoid 404s.spatie/laravel-sitemap).stevebauman/location and configure MaxMind GeoIP.HandleUrlRedirects to the web middleware stack.HasUrl to models incrementally.php artisan url-manager:check to validate configurations.UrlManagerPlugin in AdminPanelProvider.urls and url_visits tables (e.g., index maintenance).stevebauman/location for security patches.lastmod dates.// Cache redirect rules for 1 hour
$redirect = Redis::remember('
How can I help you explore Laravel packages today?