Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Robin7331's avatar

How to deal with Scout in a Forge deploy script?

Hey there! I'm experimenting with MeiliSearch and Laravel Scout. As far as I know one has to php artisan scout:import "App\Models\MyModel" to add this model to MeiliSeach. (e.g. create the index for it).

I am wondering what the best approach for a forge deployent is? Should I call this command (for every model that I have) every time I deploy?

I am also thinking about adding php artisan meilisearch:refresh to every forge deployment. Does that make any sense?

Thanks in advance.

1 like
0 replies

Please or to participate in this conversation.