sgpatil/orientdb-laravel-5
Larablocks Analysis
sgpatil/orientdb-laravel-5 is built for Laravel 5, going by its name (latest release v5.4.0.1, Mar 24, 2017), which reached end of life: no more fixes, even for security.
Laravel 5 in earlier releases.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
Named as the replacement for sgpatil/orientdb.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Mar 24, 2017)
- 0 downloads a month (needs 10,000)
- 46 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Mar 24, 2017.
- No releases in the last 12 months.
- First released: Feb 1, 2016.
- 11 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.
| Install | |
|---|---|
composer require sgpatil/orientdb-laravel-5 |
|
| Latest Version: | v5.4.0.1 |
| Older releases: | 5 |
| License: | MIT |
| Last Updated: | Oct 5, 2017 |
| Links: | GitHub · Packagist |
Orientdb Driver for Laravel 5
Oriquent is Orientdb Eloquent Driver for Laravel 5
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-masterwill always point to latest release. Currently pointing to Laravel 5.4
You can check complete installation guide in Installation Section.
Quick Reference
Requirements
- Laravel 5.2
- Orientdb Server 2.1 or above
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
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
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
// 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
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.
Want to learn more? See the wiki.
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v5.4.0.1 | MIT | |||
| v5.3.0.1 | MIT | |||
| v5.2.0.2 | MIT | |||
| v5.2.0.1 | MIT | |||
| v5.2.0.0 | MIT | |||
| v5.1.0.1 | >=5.4.0 | 5.1.* | MIT | |
| v5.1.0.0 | >=5.4.0 | 5.1.* | MIT | |
| v1.0.0 | >=5.4.0 | 5.1.* | MIT |