Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jrdavidson's avatar

Roles and Permissions and Policy Classes

I'm really trying to figure out with my roles and permissions working with my Policy class why I"m not getting a dd() in my policy create method when I run my test.

I've debugged to the point where everything works until it hits the endpoint in my test and doesn't return a 200 since they admin user has the permission to see the page.

Any ideas?

https://gist.github.com/JeffreyDavidson/49fd1cb511317b3ee6493e9dcd61e2cb

0 likes
4 replies
jrdavidson's avatar

I've tried dumping every where but it just doesn't seem to hit my policy class at all.

jrdavidson's avatar

Any suggestions at least to help me narrow it down because I don't know why its not giving me either dd() in my policy.

jrdavidson's avatar

Has anyone been able to check this code out and see if they can see what I'm not doing or doing wrong?

Please or to participate in this conversation.