Laravel Application Helper: policy

November 20, 2016 —John Koster

policy($class)

The policy helper function can be used to retrieve a policy (a policy class can be any valid PHP class) instance for a given $class. The $class can be either a string or an object instance. If no policies for the given $class have been registered with the application an instance of InvalidArgumentException will be thrown.

Some absolutely amazing
people

The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.