PHPackages                             lucasmichot/eloquentcopy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. lucasmichot/eloquentcopy

AbandonedLibrary[Database &amp; ORM](/categories/database)

lucasmichot/eloquentcopy
========================

Provides a simple way to duplicate a model instance

0.1(11y ago)022MITPHPPHP &gt;=5.4.0

Since Jul 8Pushed 11y agoCompare

[ Source](https://github.com/lucasmichot/eloquentcopy)[ Packagist](https://packagist.org/packages/lucasmichot/eloquentcopy)[ RSS](/packages/lucasmichot-eloquentcopy/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

EloquentCopy
============

[](#eloquentcopy)

Provides a simple way to duplicate a model instance.

Requirements:

- PHP &gt;= 5.4
- [Laravel 4.2](http://laravel.com/)

Package installation
--------------------

[](#package-installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `lucasmichot/eloquentcopy`.

```
"require": {
  "lucasmichot/eloquentcopy": "0.*"
}
```

Next, update Composer from the Terminal:

```
$ composer update
```

You can achieve these operations with this one-liner command :

```
$ composer require "lucasmichot/eloquentcopy:0.*"
```

Usage
-----

[](#usage)

```
use Lucasmichot\Eloquentcopy\CopyTrait;

class Post extends Eloquent
{
    use CopyTrait;

    // the code of your model comes here
}
```

Copying an instance of the model :

```
$firstPost = Post::create([
	'title' => 'Foo',
	'text'  => 'Sample text',
]);

$secondPost = $firstPost->copy();
// $secondPost has no ID, no created_at and no updated_at attribute

$secondPost->save();
```

TODO
----

[](#todo)

- Finish documentation

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4379d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/513603?v=4)[Lucas Michot](/maintainers/lucasmichot)[@lucasmichot](https://github.com/lucasmichot)

---

Top Contributors

[![lucasmichot](https://avatars.githubusercontent.com/u/513603?v=4)](https://github.com/lucasmichot "lucasmichot (1 commits)")

---

Tags

laraveleloquentcopy

### Embed Badge

![Health badge](/badges/lucasmichot-eloquentcopy/health.svg)

```
[![Health](https://phpackages.com/badges/lucasmichot-eloquentcopy/health.svg)](https://phpackages.com/packages/lucasmichot-eloquentcopy)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.7k](/packages/illuminate-database)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k332.0k1](/packages/cybercog-laravel-love)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.3M18](/packages/reedware-laravel-relation-joins)[lemaur/eloquent-publishing

218.1k1](/packages/lemaur-eloquent-publishing)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
