Download the PHP package gabrielesbaiz/duplicate-toolkit without Composer

On this page you can find all versions of the php package gabrielesbaiz/duplicate-toolkit. 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 duplicate-toolkit

DuplicateToolkit

Duplicate an Eloquent record and everything under it — deciding, per relation, whether to copy it, point at the original, or leave it alone.

Latest version Downloads Stars Sponsor

📖 Read the documentation →

Every option, a terminal and an engineering plate that draw your model's relation tree in step, and a guide that covers each strategy end to end.

[!CAUTION] Upgrading from 1.x? Read UPGRADE.md first. 1.x leaked relations between model classes in the same request, discovered relations by reading your source files and invoking every public method, and crashed on morphToMany. php artisan duplicate-toolkit:upgrade rewrites most of it; two cases need a human.

[!IMPORTANT] A ⭐ costs you nothing and helps other developers find this package. Sponsoring keeps it compatible with every new Laravel release.

What it does

Eloquent ships replicate(). It copies one row's attributes and hands back an unsaved model. If that is all you need, use it — one method call, no dependency. This package exists for the rows underneath the one you copied:

Relations are discovered by reflecting on return types — no source parsing, no model methods invoked, no cache shared between classes.

Requirements

Installation

Add the HasDuplicates trait to a model and call $model->duplicate(). The service provider is auto-discovered — no migrations, no tables, no assets — and publishing the config is optional, since the defaults duplicate correctly untouched.

Full installation guide →

Artisan commands

Command Purpose
duplicate-toolkit:relations {model?} Print the relation tree and the strategy that applies to each relation.
duplicate-toolkit:duplicate {model?} {id?} Duplicate a record, interactively or from flags. --dry-run plans it.
duplicate-toolkit:make-options {model?} Generate a typed duplicateOptions() from a relation picker.
duplicate-toolkit:upgrade {path} Rewrite 1.x usages to the 2.0 API.

Every flag is on the commands page.

Documentation

Documentation site Everything: install, configure, operate.
Relation strategies Copy, reference, skip — and the defaults per relation type.
Configuration Every key, and its per-duplication equivalent.
Troubleshooting The failures people actually hit.
UPGRADE.md Upgrading from 1.x. Read before you start.
CHANGELOG.md What changed, and when.

Testing

CI runs the suite on PHP 8.3 and 8.4 × Laravel 12 and 13, on both prefer-lowest and prefer-stable.

Contributing

Thank you for considering contributing. The guide is in CONTRIBUTING.md.

Security vulnerabilities

Please review SECURITY.md for reporting a vulnerability. Please do not open a public issue.

Credits

Written and maintained by Gabriele Sbaiz.

The 1.x line was a fork of neurony/laravel-duplicate by Neurony Solutions, whose design informed this one. This package builds on Laravel and spatie/laravel-package-tools.

Support this package

If it is useful to you:

Sponsor on GitHub

Disclaimer

This package is provided as is, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, title and non-infringement. To the fullest extent permitted by applicable law, in no event shall the authors, copyright holders or contributors be liable for any claim, damages or other liability — whether in an action of contract, tort or otherwise — arising from, out of or in connection with this package or its use, including without limitation any direct, indirect, incidental, special, exemplary, consequential or punitive damages, loss of data, loss of profits, business interruption, or corruption of records.

This package writes to your database. It creates rows, copies relations and, when you ask it to, attaches existing records to new ones. Whoever deploys it is responsible for deciding whether the result is correct for their schema. That responsibility includes, and is not limited to, reviewing what each relation strategy will do before enabling it, running preview() or --dry-run against production-shaped data, keeping backups, understanding that duplicated rows may trigger observers, listeners, queued jobs and search indexing unless quietly() is used, and reading the code yourself before pointing it at data you cannot afford to lose. Nothing here constitutes legal or compliance advice.

Use of this package is entirely at your own risk.

License

MIT. See LICENSE.md. The MIT licence's warranty disclaimer and limitation of liability apply in full, alongside the disclaimer above.


All versions of duplicate-toolkit with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^12.0||^13.0
illuminate/contracts Version ^12.0||^13.0
illuminate/database Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
spatie/laravel-package-tools Version ^1.16
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 gabrielesbaiz/duplicate-toolkit contains the following files

Loading the files please wait ...