Search

ECommerce search powered by ElasticSearch

{ "data": [ { "id": "lnrxvznx", "brand": "Jolly Rancher", "name": "Jolly Ranchers Assorted Flavours Hard Candy", "page_title": "The sweetest Candy in the Galaxy", "product_information": "A piece of Candy" } ] }
php
<?php

Candy::products()->search([
    'keywords' => 'Jolly Ranch',
    'type' => 'product',
    'category' => 'd9k704lg',
    'brand' => 'Nestle',
]);
Parameter Type Required Description

type

String

true

Search for either `product` or `category`

{attribute}

Array|String

false

The attribute to filter on

category

String

false

Limit to a specific category

keywords

String

true

The keywords to search

Model Definitions

Product