Laravel Pro Tips
#authentication #middleware
How to implement multi-login redirections in @laravelphp, you can use middleware to check the user's role and redirect them to the appropriate page #Laravel #laravelphp
Marouan Afkir
#admin #middleware
#Laravel Tip: If your user only has a role of admin or user, you can create a column of 'is_admin' (boolean type) in the users table and create a custom middleware to check if user is admin or not.
andywong31
#requests #middleware
Laravel Tip 💡 Did you know you can enrich request data using a middleware? For example, resolve the user origin country using their IP and add the country abbreviation to the request.
Philo Hermans
#middleware
You can exclude middleware at the route level in Laravel using the withoutMiddleware method.
Alex Garrett-Smith
Jan 12th, 2023
#routes #controllers #middleware
Laravel Middleware: Put in Routes, Controller, or Elsewhere? (4 Options)
If you have a Middleware, where you should use it: in the Routes file or in the Controller? Here are the FOUR options.