PHPackages                             pin-cnx/orientdb-laravel-5 - 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. pin-cnx/orientdb-laravel-5

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

pin-cnx/orientdb-laravel-5
==========================

Laravel Orientdb Driver

02PHP

Since Oct 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/pin-cnx/orientdb-laravel-5)[ Packagist](https://packagist.org/packages/pin-cnx/orientdb-laravel-5)[ RSS](/packages/pin-cnx-orientdb-laravel-5/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

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

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

Orientdb Graph Eloquent Driver for Laravel 5

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

[](#quick-reference)

- [Requirements](#requirements)
- [Installation](#installation)
- \[Configuration\](#Database Configuration)
- [Migration](#migration)
- [Relationships](#relationships)

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

[](#requirements)

- Laravel 5.1 or above
- Orientdb Server 2.1 or above

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

[](#installation)

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

```
{
    "require": {
        "sgpatil/orientdb-laravel-5": "dev-master"
    }
}
```

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',
'default_nosql' => 'orientdb', //optional if you are using orientdb as a secondary connection
```

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

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/367ebdfd68ca59e906da604562d4b28c34700337d24b714ecf03960d88364e2d?d=identicon)[pin-cnx](/maintainers/pin-cnx)

---

Top Contributors

[![pin-cnx](https://avatars.githubusercontent.com/u/10082757?v=4)](https://github.com/pin-cnx "pin-cnx (21 commits)")

### Embed Badge

![Health badge](/badges/pin-cnx-orientdb-laravel-5/health.svg)

```
[![Health](https://phpackages.com/badges/pin-cnx-orientdb-laravel-5/health.svg)](https://phpackages.com/packages/pin-cnx-orientdb-laravel-5)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M114](/packages/jdorn-sql-formatter)[propel/propel1

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

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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