Courses

Eloquent: The Expert Level (Laravel 9)

Spatie Laravel Searchable and Cross Eloquent Search

Previous: Spatie Query Builder and Alternative Eloquent Filter
avatar

Could you create an example doing this same concept but using laravel scout? For example meilisearch with index that has generic meta descriptions with model_type attribute filterable?

so If I want to create entire website search leavel model_type filter off, but if need only posts then add model_type filter 'posts' (polymoprhic index)

What would be the format? Title, description, tags?, model_type, model_id, how_create_unique_id?

The issue I came up with when I need specific model filtering and sorting it becomes to large.

And then how would it be possible to keep the index updated across multiple models for example when a new post is created or a new user is created. I want the index to be updated. I know you can specific the index in model on scout and the attributes. Maybe also when a relationship is updated update the indexed item.

Then lastly how would create a "actions" table for example I want to add search options when user hits '/' on keyboard whole website search opens and then if they type keywords like "create" then pull at actions options Create: user, Create: post. When you select one of those options it then opens the create view.

avatar

This is a very broad question, I don't have a quick answer. I'm planning to MAYBE shoot some videos/courses on Scout with Meilisearch/Algolia/Elastic in 2023, but still hesitating, because it's actually used for quite a small audience of developers, I have topics for broader audience still.

avatar
You can use Markdown
avatar

Hello, can we do the same with Laravel scout with database driver like those 2 packages you mention in the video ? Or those packages have more features ?

I am asking because I always prefer to use packages from the Laravel documentation first. I am also asking because maybe Laravel Scout was not available at the time when you did the video.

Thanks a lot.

avatar
You can use Markdown
avatar
You can use Markdown