Download the PHP package mozex/laravel-scout-bulk-actions without Composer

On this page you can find all versions of the php package mozex/laravel-scout-bulk-actions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-scout-bulk-actions

Laravel Scout Bulk Actions

Latest Version on Packagist GitHub Checks Workflow Status Docs License Total Downloads

Laravel Scout's built-in commands work on one model at a time. If your project has ten searchable models, that's ten separate scout:import calls every time you need to rebuild your indexes. This package fixes that.

Scout Bulk Actions auto-discovers every model that uses the Searchable trait and lets you import, flush, or refresh all of them with a single command. It also supports queued bulk imports for projects where synchronous indexing is too slow.

Read the full documentation at mozex.dev: searchable docs, version requirements, detailed changelog, and more.

Table of Contents

Support This Project

I maintain this package along with several other open-source PHP packages used by thousands of developers every day.

If my packages save you time or help your business, consider sponsoring my work on GitHub Sponsors. Your support lets me keep these packages updated, respond to issues quickly, and ship new features.

Business sponsors get logo placement in package READMEs. See sponsorship tiers →

Installation

Requires PHP 8.2+ - see all version requirements

Install the package via Composer:

That's it. The package auto-registers its service provider via Laravel's package discovery.

Configuration

Publish the config file:

This creates config/scout-bulk-actions.php:

The model_directories array tells the package where to look for your searchable models. By default it scans app/Models, which covers most Laravel projects.

Glob patterns work here too. If you're using a modular architecture, something like base_path('Modules/*/Models') will scan the Models directory inside every module at once.

After changing the config in production, run php artisan config:clear to pick up the new values.

Commands

scout:import-all

Imports all discovered searchable models into the search index:

You can control the chunk size (how many records are sent per batch) with the --chunk option:

If omitted, it falls back to the scout.chunk.searchable config value.

scout:flush-all

Removes all records from the search index for every discovered model:

scout:queue-import-all

For large datasets, synchronous imports can be slow. This command dispatches queued jobs that split each model's records into chunks by ID range, the same approach Scout's native scout:queue-import uses, but applied across all your models at once:

Options:

This is the fastest way to rebuild indexes for projects with many models and millions of rows.

scout:refresh

Flushes then imports, in one step. Useful when you need a clean re-index:

You can also target a single model:

When no model is specified, it runs scout:flush-all followed by scout:import-all under the hood. The --chunk option works here too.

Production Safety

All commands ask for confirmation when APP_ENV is production. To skip the prompt (for CI pipelines or automated scripts), pass --force:

How It Works

The package scans the directories you've configured using Symfony's Finder component. For each PHP file it finds, it:

  1. Converts the file path to a fully qualified class name.
  2. Checks via Reflection that the class is a concrete (non-abstract) Eloquent model.
  3. Verifies the class uses Laravel Scout's Searchable trait.

Models that pass all three checks are collected, and the chosen Scout command (scout:import, scout:flush, or scout:queue-import) runs against each one. A progress bar tracks the operation so you can see where things stand.

If any single model fails during the operation, the command stops immediately and returns a failure exit code.

Resources

Visit the documentation site for searchable docs auto-updated from this repository.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-scout-bulk-actions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2.0
laravel/framework Version ^11.29|^12.12|^13.0
laravel/prompts Version ^0.1.15|^0.2.0|^0.3.4
laravel/scout Version ^10.17|^11.0
spatie/laravel-package-tools Version ^1.19.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mozex/laravel-scout-bulk-actions contains the following files

Loading the files please wait ...