Cloudinary search Undefined function
Hi,
I am using the cloudinary API in php with composer.
When I try to use the search function that is indicated as an example in the documentation
result = \ Cloudinary \ search ()
-> expression ('cat AND -tags: kitten')
-> sort_by ('public_id', 'desc')
-> aggregate ('format')
-> execute ();
it gives me error "Undefined function 'Cloudinary \ search'"
I hope you can help me
Composer
"cloudinary / cloudinary_php": "^ 1.16"
PHP
7
XAMPP
3.2.4
0
-
Hi Xadani,
I believe you also opened a ticket with us on this.
In order to use our search API with PHP SDK, you need to create a search object first.
Here's the example:$search = new \Cloudinary\Search(); $results = $search->expression('resource_type=image AND type=upload')->execute();echo $results['resources'][0]['secure_url'];Hope this helps.
Regards,
Erwin Lukas0
Post is closed for comments.
Comments
1 comment