teamtnt / laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch
MIT License
1.1k stars 144 forks source link

[Question] Does this plugin support scopes? #195

Closed chrispage1 closed 6 years ago

chrispage1 commented 6 years ago

Hi,

So I have a lot of results that are limited by user. I was just wondering if with this particular driver, it'd listen and respect scopes?

Thanks, Chris.

chrispage1 commented 6 years ago

I decided in the end just to test it and can confirm it does. For others who are wondering this -

What this plugin seems to do is search an index that is stored by default in Laravel's storage directory. It then retrieves the ID of each listing that matches this and then performs a lookup against your live database to return Eloquent models. It's at this point where any global scopes etc are applied and ultimately results in being able to restrict searching etc.