Support the ongoing development of Laravel.io →
Security IOC Architecture

I'm looking for a way to pass more than just one variable to the policy function. According to the docs, you can pass an array of multiple variables when using Gates. When I pass an array into the policy function, dumping the array only shows the object bound to the policy... for more information see this thread on stackoverflow please: https://stackoverflow.com/questions/36482737/laravel-policies-how-to-pass-multiple-arguments-to-function

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

johannesz johannesz Joined 24 Feb 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.