Authorisation/Authentication features in Laravel Part 3 - Middleware

Jun 26, 2017 laravel middleware routes authorisation
WhatsApp
Think of it as rules for a single or many routes; it is also possible to group an assortment of routes, mainly to keep the code much more readable. Their use is to direct users from entering pages or areas of a website, somewhat like directing traffic.

As an example if a guest user tries to enter an a page for admins, before any code is executed in the route, the app will run the middleware assigned to the route, verify the ruleset made for the middleware and they would be either blocked and redirected to a login page. It’s important to reiterate that the middleware is run first before the controller code within the route.

If you found the following info helpful, I'm happy to accept any donations of the following cryptocurrencies.

  • Bitcoin - 17DTiPExzP9StqveW428acEyB4mVMfKbiK
  • Ethereum - 0x87B8307FD20dc90cc05c94905Ec593134D32B6FF
  • Litecoin - LZMiz5U5sVq9doMLYE3gfLJrxCQDKuyCmU
  • Neo - AXv71WB38ajc1KUUEnxQKhynLLPc4BapVb