PHP code example of sgpatil / orientdb

1. Go to this page and download the library: Download sgpatil/orientdb library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sgpatil / orientdb example snippets


'Sgpatil\Orientdb\OrientdbServiceProvider',

'default' => 'orientdb',

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

php artisan orient:make create_users_table

php artisan orient:make add_votes_to_users_table --table=users_votes

php artisan orient:make create_users_table --create=users

php artisan orient

class User extends Orientdb {

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

$user = User::create(['name' => 'Some Name', 'email' => '[email protected]']);