public static function policies()
    {
        $abilities = array_values(
            (new \ReflectionClass($instance = new static))->getConstants()
        );

        return array_map(function ($constant) use ($instance) {
            $method = Str::camel(last(explode('.', $constant)).'Policy');

            if ( ! method_exists($instance, $method))
                throw new MissingPolicyException("Missing policy [$method] method in ".get_class($instance).".");

            return $method;
        }, array_combine($abilities, $abilities));
    }
public static function policies()
    {
        $abilities = array_values(
            (new \ReflectionClass($instance = new static))->getConstants()
        );

        return array_map(function ($constant) use ($instance) {
            $method = Str::camel(last(explode('.', $constant)).'Policy');

            if ( ! method_exists($instance, $method))
                throw new MissingPolicyException("Missing policy [$method] method in ".get_class($instance).".");

            return $method;
        }, array_combine($abilities, $abilities));
    }
public static function policies ( ) { $ abilities = array_values ( ( new \ ReflectionClass ( $ instance = new static ) ) -> getConstants ( ) ) ; return array_map ( function ( $ constant ) use ( $ instance ) { $ method = Str :: camel ( last ( explode ( '.' , $ constant ) ) . 'Policy' ) ; if ( ! method_exists ( $ instance , $ method ) ) throw new MissingPolicyException ( "Missing policy [$method] method in " . get_class ( $ instance ) . "." ) ; return $ method ; } , array_combine ( $ abilities , $ abilities ) ) ; }
Get the policies.

@return array
Get the policies .