PHPackages                             sgpatil/oriquent - 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. sgpatil/oriquent

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

sgpatil/oriquent
================

Laravel Orientdb Driver

v5.4.0.1(9y ago)4738714[11 issues](https://github.com/sgpatil/oriquent/issues)MITPHP

Since Feb 1Pushed 8y ago6 watchersCompare

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

READMEChangelog (8)Dependencies (4)Versions (12)Used By (0)

Orientdb Driver for Laravel 5
=============================

[](#orientdb-driver-for-laravel-5)

Oriquent is **Ori**entdb Elo**quent** Driver for Laravel 5

Version Naming
--------------

[](#version-naming)

The version tagging convention which we are following is **vX.Y.x.y** where

```
   X => Laravel Major Release
   Y => Laravel Minor Release
   x => Oriquent Major Release
   y => Oriquent Minor Release

```

So to install oriquent on Laravel 5.4 you will need to install v5.4.\*.\*

and to install oriquent on Laravel 5.3 you will need to install v5.3.\*.\*

> Note : Branch `dev-master` will always point to latest release. Currently pointing to Laravel 5.4

You can check complete installation guide in [Installation](#installation) Section.

Quick Reference
---------------

[](#quick-reference)

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#database-configuration)
- [Migration](#migration)
- [Relationships](#relationships)

Requirements
------------

[](#requirements)

- Laravel 5.2
- Orientdb Server 2.1 or above

Installation
------------

[](#installation)

STEP 1 :

Add the package to your `composer.json` and run `composer update`.

```
{
    "require": {
        "sgpatil/oriquent": "dev-master"
    }
}
```

OR

Run below command in terminal

```
$ composer require sgpatil/oriquent
```

STEP 2 :

Add the service provider in `config/app.php`:

```
Sgpatil\Orientdb\OrientdbServiceProvider::class,
```

This will register all the required classes for this package.

Database Configuration
----------------------

[](#database-configuration)

Open `config/database.php`make `orientdb` your default connection:

```
'default' => 'orientdb',
```

And optionally, if you want to use orientdb as a secondary connection

```
'default_nosql' => 'orientdb',
```

Add the connection defaults:

```
'connections' => [
    'orientdb' => [
        'driver' => 'orientdb',
        'host'   => 'localhost',
        'port'   => '2480',
        'database' => 'database_name',
        'username' => 'root',
        'password' => 'root'
    ]
]
```

Add your database username and password in 'username' and 'password' field. In 'database\_name' add name of orientdb database which you want to connect and use.

Migration
---------

[](#migration)

To create a migration, you may use the orient command on the Artisan CLI:

```
php artisan orient:make create_users_table
```

The migration will be placed in your database/migrations folder, and will contain a timestamp which allows the framework to determine the order of the migrations.

The --table and --create options may also be used to indicate the name of the table, and whether the migration will be creating a new table:

```
php artisan orient:make add_votes_to_users_table --table=users_votes

php artisan orient:make create_users_table --create=users
```

To run migration

```
php artisan orient:migrate
```

How to Use
----------

[](#how-to-use)

```
// To insert a record
class User extends \Orientdb {

    protected $fillable = ['name', 'email'];
}

$user = User::create(['name' => 'Some Name', 'email' => 'some@email.com']);
```

You can use this by extending Orientdb into model class.

To fetch all records

```
$users = User::all();
foreach($users as $user){
        echo $user->id;
        echo $user->name;
        echo $user->email;
    }
```

To find a record

```
$user = User::find(1);
```

To update a record

```
$user = User::find(1);
$user->name = "New Name";
$user->save();
```

Relationships
-------------

[](#relationships)

To create one-to-one relationship

```
$user =   User::create(['name'=>"Sumit", 'email' => "demo@email.com"]); // Create User node
$phone = new Phone(['code' => 963, 'number' => '98555533']); // Create Phone node
$relation = $user->has_phone()->save($phone); // Creating relationship
```

Unable to find has\_phone() method ? [See full example.](https://github.com/sgpatil/orientdb-laravel-5/wiki/Relationships)

Want to learn more? [See the wiki.](https://github.com/sgpatil/orientdb-laravel-5/wiki)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~59 days

Recently: every ~95 days

Total

8

Last Release

3385d ago

Major Versions

v1.0.0 → v5.1.0.02016-03-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/22adb4a0213caf51ceafaf6a89662a08ecdd9cc4cdd7b71a4181c807f3216864?d=identicon)[sumit\_2803](/maintainers/sumit_2803)

---

Top Contributors

[![sgpatil](https://avatars.githubusercontent.com/u/9293512?v=4)](https://github.com/sgpatil "sgpatil (26 commits)")[![pin-cnx](https://avatars.githubusercontent.com/u/10082757?v=4)](https://github.com/pin-cnx "pin-cnx (19 commits)")[![cristiansitov-esoh](https://avatars.githubusercontent.com/u/240667283?v=4)](https://github.com/cristiansitov-esoh "cristiansitov-esoh (3 commits)")[![nambhd](https://avatars.githubusercontent.com/u/6092910?v=4)](https://github.com/nambhd "nambhd (2 commits)")[![nishkul](https://avatars.githubusercontent.com/u/16400465?v=4)](https://github.com/nishkul "nishkul (2 commits)")[![anjar](https://avatars.githubusercontent.com/u/1691763?v=4)](https://github.com/anjar "anjar (1 commits)")

---

Tags

orientdb-driverorientdb-laravel-driverorientdb-laravel-eloquent

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sgpatil-oriquent/health.svg)

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k116.5M113](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)

PHPackages © 2026

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