PHPackages                             hypersistence2-0/hypersistence-laravel - 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. [Framework](/categories/framework)
4. /
5. hypersistence2-0/hypersistence-laravel

ActiveLibrary[Framework](/categories/framework)

hypersistence2-0/hypersistence-laravel
======================================

PHP Object Oriented persistence framework to Laravel.

v2.8.12(3y ago)0501MITPHPPHP &gt;=5.3.0

Since Jun 3Pushed 3y ago2 watchersCompare

[ Source](https://github.com/jacobdarrossi/hypersistence-laravel)[ Packagist](https://packagist.org/packages/hypersistence2-0/hypersistence-laravel)[ RSS](/packages/hypersistence2-0-hypersistence-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (6)Used By (0)

Hypersistence2.0
================

[](#hypersistence20)

PHP Object Orented persistence framework.

To use in Laravel 5.4 add the following line in config/app.php -&gt; providers:

```
    Hypersistence\HypersistenceServiceProvider::class,
    Hypersistence\Auth\HypersistenceAuthServiceProvider::class,

```

To create models from database use the command:

```
    php artisan hypersistence:make-models  {--override}

```

To create the basic user model for authnetication use this command:

```
    php artisan hypersistence:make-auth

```

---

Use doc comment tags for mapping classes with database.

### Example:

[](#example)

```
/**
 * @table(person)
 */
class Person extends Hypersistence{

    /**
     * @primaryKey
     * @column(person_id)
     */
    private $id;

    /**
     * Use empty column when the column has the same name that var.
     * @column()
     */
    private $name;

    /**
     * When you have a Many to One relationship use tags as below.
     * You can use 'lazy' or 'eager'.
     * @manyToOne(lazy)
     * @column(city_id)
     * @itemClass(City)
     */
    private $city;

    /**
     * When you have a One to Many relationship use tags as below.
     * You can use 'lazy' or 'eager'.
     * @oneToMany(lazy)
     * @joinColumn(person_id)
     * @itemClass(Book)
     */
    private $books;

    /**
     * When you have a Many to Many relationship use tags as below.
     * You can use 'lazy' or 'eager'.
     * @manyToMany(lazy)
     * @joinColumn(person_id)
     * @inverseJoinColumn(course_id)
     * @itemClass(Course)
     * @joinTable(person_has_course)
     */
    private $courses;

    public function getId(){
        return $this->id;
    }

    public function setId($id){
        $this->id = $id;
    }

    public function getName(){
        return $this->name;
    }

    public function setName($name){
        $this->name = $name;
    }

    public function getCity(){
        return $this->city;
    }

    public function setCity($city){
        $this->city = $city;
    }

    public function getBooks(){
        return $this->books;
    }

    public function getCourses(){
        return $this->courses;
    }
}
```

### Load Example:

[](#load-example)

```
$p = new Person();
$p->setId(1);
$p->load();

echo $p->getName();
```

### Save Example:

[](#save-example)

```
$p = new Person();
$p->setName('Mateus Fornari');
$city = new City(1);
$city->load();
$p->setCity($city);
$p->save();
```

### Search Example:

[](#search-example)

```
$p = new Person();
$p->setName('Mateus');

$search = $p->search();
$search->orderBy('name', 'asc');
$search->orderBy('city.name', 'desc');

$list = $search->execute();
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

Every ~45 days

Total

4

Last Release

1301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c73c7f368c90e2ca6d332ec56a4828b457d1bb8af635e01fd90faa15d1d1436e?d=identicon)[jacobdarrossi](/maintainers/jacobdarrossi)

---

Top Contributors

[![MarceloSoiber](https://avatars.githubusercontent.com/u/1223835?v=4)](https://github.com/MarceloSoiber "MarceloSoiber (2 commits)")[![jacobdarrossi](https://avatars.githubusercontent.com/u/25744122?v=4)](https://github.com/jacobdarrossi "jacobdarrossi (1 commits)")

---

Tags

frameworklaravelpersistencemicroframework

### Embed Badge

![Health badge](/badges/hypersistence2-0-hypersistence-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/hypersistence2-0-hypersistence-laravel/health.svg)](https://phpackages.com/packages/hypersistence2-0-hypersistence-laravel)
```

###  Alternatives

[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27431.5k](/packages/rahulalam31-laravel-abuse-ip)

PHPackages © 2026

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