In this video, we are going to create a guard which is going to be dynamic in nature. It will allow us to use it on different APIs and check for different kinds of roles for a given user.
In our last video, we created a guard which was only looking for an admin role. This although works, is not a scalable option. Hence, we need something which can allow us to reuse the logic no matter how many roles we have inside our application.
You can find me on:
Code: [ Ссылка ]
Twitter: [ Ссылка ]
Discord: [ Ссылка ]
![](https://i.ytimg.com/vi/srpEwVU0Yk8/maxresdefault.jpg)