0

I use the 'BjyAuthorize\Guard\Controller', which have all my Controllers and Actions.

  • Do I need to use 'BjyAuthorize\Guard\Route'?
  • If this is necessary, what routes I have to use?
  • It is clear that each route depends on action, or am I wrong?

So, why I need use 'BjyAuthorize\Guard\Route', if all rules are defined in 'BjyAuthorize\Guard\Controller'?

I will be grateful for best practice.

ale
  • 10,012
  • 5
  • 40
  • 49
Paultec
  • 1
  • 1

1 Answers1

0

Necessary and best practice are not the same thing. A lot depends on the complexity of your application and what you are trying to accomplish. I have read many just using BjyAuthorize\Guard\Controller as there may be more than one route going to a controller. If your routing is not very complex this would be the way to go in my opinion.

See this answer: Zend Framework 2 - BjyAuthorize always denies access

Community
  • 1
  • 1
Marty
  • 582
  • 4
  • 17