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 Tests Action Status GitHub Code Style Action Status GitHub Code Analysis Action Status Total Downloads

Laravel Scout Bulk Actions is a comprehensive Laravel package designed to simplify and streamline your work when dealing with many models. If you've ever found it difficult to import or flush all records of each model into the index one by one, then this package is a game changer for you.

Our package alleviates the limitations of Laravel Scout's native commands scout:import <model> and scout:flush <model> by allowing you to perform these actions across all models simultaneously. This functionality can save considerable time and effort, especially when developing and testing projects with many models.

Features

Why Laravel Scout Bulk Actions?

When dealing with many models, it can quickly become cumbersome to import and flush records for each model individually. This is especially true in the development phase, where such operations must be performed multiple times. By facilitating bulk actions on all models, our package significantly reduces the time and effort required for these operations.

For large-scale applications with several models, Laravel Scout Bulk Actions is an indispensable tool that dramatically enhances your productivity and efficiency. Enjoy less time typing commands and more time crafting your Laravel masterpiece. Your testing phase will thank you for it!

In summary, Laravel Scout Bulk Actions is designed to improve and simplify your Laravel Scout experience. It's a small package with significant benefits that have the potential to make a massive difference in your Laravel project. So why wait? Give Laravel Scout Bulk Actions a try today!

Support Us

Creating and maintaining open-source projects requires significant time and effort. Your support will help enhance the project and enable further contributions to the Laravel community.

Sponsorship can be made through the GitHub Sponsors program. Just click the "Sponsor" button at the top of this repository. Any amount is greatly appreciated, even a contribution as small as $1 can make a big difference and will go directly towards developing and improving this package.

Thank you for considering sponsoring. Your support truly makes a difference!

Installation

You can install the package via composer:

Configuration

You can publish the config file with:

After publishing the config file, a configuration file named scout-bulk-actions.php will be created in your config directory. You can define which directories to scan for models that are using the Searchable trait in this file.

This is the contents of the published config file:

You can add any path to the model_directories array. This is where you tell Laravel Scout Bulk Actions where to look for your models. For instance, app_path('Models') will target the app/Models directory.

The model_directories array also accepts glob patterns. This can be useful if your models are spread across multiple directories. For example, if you have a directory for each module in your application, and each of these module directories has a Models subdirectory, you could add a path like base_path('Modules/*/Models') to include all these Models directories at once.

Remember to clear your config cache using php artisan config:clear if you make any changes to the configuration file and your application is in production mode.

Usage

Once the package is installed, you'll have access to three new Artisan commands:

Importing All Models

To import all models into the Scout index, use the scout:import-all command:

This will loop through all your Scout Searchable models and import them into your Scout index.

Flushing All Models

To remove all models from the Scout index, use the scout:flush-all command:

This will loop through all your Scout Searchable models and flush them from your Scout index.

Refreshing All Models

To refresh (flush and then import) all models data in your Scout index, use the scout:refresh command:

This will flush all models from your Scout index and then import them again.

Refreshing Specific Model

The scout:refresh command can also be used with a specific model name. This will only refresh the index for the given model:

If no model name is passed to the scout:refresh command, it will refresh all models.

How Does It Work?

The Laravel Scout Bulk Actions package has been designed to automatically identify and interact with all models in your Laravel application that use Scout's Searchable trait.

Upon execution of a command, the package will first scan the directories specified in the config file for models. This is done to find all models utilizing Laravel Scout's Searchable trait.

Once the models have been identified, the package will then execute Scout's native import or flush commands on each of these models, depending on the command you've chosen to run.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

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.1
illuminate/contracts Version ^10.0|^11.0
laravel/prompts Version ^0.1.15|^0.2.0|^0.3.0
laravel/scout Version ^10.2
spatie/laravel-package-tools Version ^1.14.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 ....