Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Searching aggregators
$models = App\Search\News::search('Star Trek')->get();
echo get_class($models[0]); // "App\Article"
echo get_class($models[1]); // "App\Comment"
$results = App\Search\News::search('Star Trek')->raw();
"title": "Article title",
"slug": "article-title",
"content": "Article content",
"id": 1,
"content": "Comment content",
"objectID": "App\\Comment::1",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.