Download the PHP package waqassiwag/laravel-variant-generator without Composer
On this page you can find all versions of the php package waqassiwag/laravel-variant-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download waqassiwag/laravel-variant-generator
More information about waqassiwag/laravel-variant-generator
Files in waqassiwag/laravel-variant-generator
Package laravel-variant-generator
Short Description A Laravel package to generate all possible product variants (Cartesian Product) from a set of attributes.
License MIT
Informations about the package laravel-variant-generator
Laravel Variant Generator
A fast and fluent Laravel package to generate all possible product variants (Cartesian Product) from a set of attributes.
Requirements
- PHP 8.1+
- Laravel 10.0+ / 11.0+ / 12.0+
Installation
Basic Usage
Pass an array of your product attributes to generate all possible combinations.
Output:
Advanced Features
1. Excluding Variants
Remove specific combinations that you don't want to generate.
2. Custom Formatting
Modify the output exactly how you need it.
3. Generating SKUs
Automatically append a unique SKU to each variant.
Output:
4. Fluent API
You can chain all these methods together to build complex generation logic cleanly.
Tip: You can also call
->generateAsCollection()at the end if you prefer working with a Laravel Collection instead of an array.
Testing
Support & Security
Support
-
Issues: Open an issue in GitHub
-
Security: If you discover any issues, please email
[email protected].Credits
- Muhammad Waqas
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-variant-generator with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/collections Version ^10.0|^11.0|^12.0