mozex/laravel-scout-bulk-actions
Laravel Scout's commands handle one model at a time. This package auto-discovers every model using the Searchable trait and lets you import, flush, or refresh them all with a single command, plus queued bulk imports for faster indexing.
--fresh flag and scout:refresh behave differently, and that difference is a product tradeoff, not a technical detail. scout:refresh empties every index before importing, so search is degraded or empty for the whole rebuild; --fresh removes one model at a time for only its own import window. That is the difference between "search is broken for two hours during a migration" and "search stays up, one content type gets momentarily thin." A PM should be the one deciding which is acceptable per release.--order=desc on scout:queue-import-all indexes the newest rows first, so on a multi-hour rebuild recent content returns to search early instead of last. This directly affects what users see in the first hours after a large import — relevant for launches, backfills, and content migrations where recency drives the experience.Modules/*/Models) is a proxy for how much searchable surface the product has. If the config needs more than a couple of paths, that's a signal the search feature has grown into a multi-domain concern needing its own owner, not a side task.Searchable trait, loop a native Scout command with a progress bar. That is a strong argument for adopting rather than building, and an equally strong argument that the ceiling on differentiation here is low. Adopt it to reclaim engineering hours; do not put it on a roadmap slide.--force for automated pipelines mean reindexing can be wired into CI/CD with an auditable, single entry point. Good for teams that need evidence that index state is reproducible across staging and production.Searchable. That reduces the "only one person can do this" risk on a critical workflow.Adopt when most of these hold:
app/Models. Below that threshold, native scout:import per model is fine and adding a dependency is not worth it.scout:queue-import-all and chunk/queue targeting genuinely useful.--fresh vs scout:refresh distinction matters and someone will actually choose between them.Look elsewhere, or write the twenty lines yourself, when any of these hold:
For engineering: A drop-in that replaces N per-model scout:import calls with one auto-discovered, progress-tracked command, plus queued bulk imports with chunk and queue targeting, ordering control for long rebuilds, and production confirmation gates with a --force escape hatch for CI. Requires PHP 8.2+ and a recent Laravel Scout; supports Laravel 13 and Scout 11. Small, MIT, actively maintained, small enough to fork if it stalls. Honest caveats to state up front: it halts on the first model failure with no retry or resume, and it does not touch index settings — so if we put it in a production rebuild path, we should wrap it with per-model isolation and logging.
For executives: This is plumbing, not a feature. It removes manual, error-prone reindexing steps from our deploy process — the kind of work that costs engineering hours and occasionally causes "search is empty" incidents after a release. It is free, MIT-licensed, and adoptable in an afternoon. Two things to be clear about: it does not increase engineering headcount or capacity in any meaningful way, and it is maintained by one person, so we treat it as a convenience layer with a cheap fallback rather than a dependency we build strategy on. If we ship multi-model search on a regular release cadence, adopt it and write the runbook; if we have two searchable models and reindex twice a year, skip it.
How can I help you explore Laravel packages today?