a5sys/logged-in-redirection-bundle
The bundle redirect the logged in user to an url if he attempt to go to an url.
The use case:
Use composer to get the bundle
composer require "a5sys/logged-in-redirection-bundle"
In the AppKernel, activate the bundle
public function registerBundles()
{
$bundles = array(
...
new A5sys\LoggedInRedirectionBundle\LoggedInRedirectionBundle(),
You have to add the configuration to your config.yml:
logged_in_redirection:
route_name: "fos_user_security_login" #the name of the route to check
redirect_route_name: "homepage" # the name of the route to redirect
How can I help you explore Laravel packages today?