Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Logout Redirector Bundle

Logout Redirector Bundle Laravel Package

ajgl/logout-redirector-bundle

View on GitHub
Deep Wiki
Context7

Allows you dinamically redirect users after logout.

Frequently asked questions about Logout Redirector Bundle
Can I use AjglLogoutRedirectorBundle in Laravel instead of Symfony?
No, this bundle is Symfony-specific and won’t work directly in Laravel. You’d need to build a custom Laravel middleware or event listener to replicate its functionality, as Laravel’s logout flow (e.g., `PostLogoutRedirectInterface`) differs from Symfony’s `LogoutEvent`.
What Laravel alternatives exist for dynamic logout redirects?
Laravel’s built-in `PostLogoutRedirectInterface` or a simple middleware (e.g., `RedirectIfAuthenticated`) can handle basic redirects. For dynamic logic, consider packages like `spatie/laravel-logout-redirect` or custom middleware that hooks into Laravel’s `logged_out` event.
How do I install AjglLogoutRedirectorBundle in Symfony?
Run `composer require ajgl/logout-redirector-bundle` in your Symfony project (5.4+ or 6.2+). The bundle integrates via Symfony’s dependency injection and event system, but check the [GitHub repo](https://github.com/ajgarlag/AjglLogoutRedirectorBundle) for configuration steps—usage examples are currently missing.
Does this bundle support conditional redirects (e.g., user roles, session data)?
The bundle’s Symfony-centric design likely supports dynamic redirects via `LogoutEvent` listeners, but Laravel would require custom logic. For Laravel, you’d need to extend the `logged_out` event or middleware to evaluate conditions like user roles or session data before redirecting.
Will this bundle add performance overhead to my logout flow?
In Symfony, the bundle’s event-driven approach is lightweight, but in Laravel, a custom middleware or event listener could introduce minor latency if redirect logic is complex. Test with your specific conditions to measure impact—caching redirect rules (e.g., in session) may help.
How do I test this bundle in Laravel if I build a wrapper?
Mock Laravel’s `logged_out` event or middleware in PHPUnit tests. For example, test a custom `LogoutRedirector` middleware by simulating a logged-out user and verifying the redirect URL. Use Laravel’s `Testing` facade to assert redirects in unit tests.
Is this bundle actively maintained? The author hasn’t updated it recently.
The package shows no recent commits or releases, and the author has limited activity. Use with caution—consider forking or maintaining a Laravel-compatible version yourself. Check the [GitHub issues](https://github.com/ajgarlag/AjglLogoutRedirectorBundle/issues) for unresolved bugs or feature requests.
Can I use this bundle alongside Laravel’s Symfony bridge (e.g., symfony/http-foundation)?
No, the bridge provides limited Symfony components and won’t support this bundle’s full dependency tree (e.g., `thecodingmachine/safe`). For Laravel, you’d need to either avoid the bundle entirely or integrate it via a hybrid Symfony/Laravel setup, which is complex and unsupported.
What PHP and Laravel versions does this bundle support?
The bundle requires **PHP 8.0+** and **Symfony 5.4+ or 6.2+**. Laravel 8.0+ meets the PHP requirement, but the bundle won’t work in Laravel without significant adaptation. For Laravel, focus on native solutions or middleware that don’t tie you to Symfony dependencies.
How do I configure dynamic redirects in Symfony with this bundle?
Symfony configuration typically involves binding a `LogoutRedirector` service to the `LogoutEvent` listener. Check the bundle’s `resources/config/services.yaml` for defaults, but since the README lacks examples, you may need to inspect the source or Symfony’s event system docs for details.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle