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 1mo ago

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 22% 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

4324d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8476d69514125fdd39d5d1caa9da3bff9c7a6345702b0dfd8d185c84adf924b9?d=identicon)[lucasmichot](/maintainers/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

[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-love

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

1.2k302.7k1](/packages/cybercog-laravel-love)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)

PHPackages © 2026

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