If you want to search in multiple Eloquent models - like posts, videos, and courses - there are a lot of different ways, with or without external packages and tools. Let's explore them in this article.
I demonstrate how to perform a search in multiple Eloquent models, in two ways: with local "like" search, and then with external tools like Laravel Scout and Algolia driver.
In Laravel 9, they introduced a new driver to Laravel Scout, that would search in your local database, instead of an external engine like Algolia, Elasticsearch, or Meilisearch.