PHPackages                             cakephparangodb/arangodb - 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. cakephparangodb/arangodb

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

cakephparangodb/arangodb
========================

An ArangoDb based model and Query builder for Cakephp 3.x

431PHP

Since Sep 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/shubham715/Cakephp-ArangoDb-Package)[ Packagist](https://packagist.org/packages/cakephparangodb/arangodb)[ RSS](/packages/cakephparangodb-arangodb/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

ArangoDB-CAKEPHP-3x - A ArangoDb based model and Query builder for Cakephp 3.x
==============================================================================

[](#arangodb-cakephp-3x---a-arangodb-based-model-and-query-builder-for-cakephp-3x)

\##### Table of Contents - [Description](#description)
- [Requirements](#requirements)
- [Installing the PHP client](#installing)
- [Using Composer](#using_composer)
- [Cloning the git repository](#cloning_git)
- [How to use the Cakephp ArangoDb Client](#howto_use)
- [Setting up the connection options](#setting_up_connection_options)
- [Models](#cakephp_arangodb_models)
- [Controllers](#cakephp_arangodb_controllers)

Description
===========

[](#description)

This is the cakephp version of the arangodb-php lib. the cakephp client allows you to convert your models to arangodb supported models easily. the cakephp arangodb client also allows you to use cakephp find, save, delete, update and joins etc simillar to cake core functionality.

Requirements
============

[](#requirements)

- Cakephp version 3.0 or higher
- ArangoDB database server version 3.0 or higher.
- PHP version 5.6 or higher

Note on PHP version support:

Installing the Cakephp arangodb client
--------------------------------------

[](#installing-the-cakephp-arangodb-client)

To get started you need PHP 5.6 or higher plus an ArangoDB server running on any host that you can access.

There are two alternative ways to get the Cakephp ArangoDb client:

- Using Composer
- Cloning the git repository

Alternative 1: Using Composer
-----------------------------

[](#alternative-1-using-composer)

```
composer require cakephparangodb/arangodb

```

> NOTE **IF ANY ERROR THEN Add minimum-stability and prefer-stable to your composer.json**

Example

```
{
    "minimum-stability": "dev",
    "prefer-stable": true
}

```

Alternative 2: Cloning the git repository
-----------------------------------------

[](#alternative-2-cloning-the-git-repository)

You need to have a git client installed. To clone this repository from github, execute the following command in your project directory:

```
git clone "https://github.com/shubham715/Cakephp-ArangoDb-Package.git"

```

This will create a subdirectory arangodb-php in your current directory. It contains all the files of the client library. It also includes a dedicated autoloader that you can use for autoloading the client libraries class files. To invoke this autoloader, add the following line to your PHP files that will use the library:

Alternative 3: Invoking the autoloader directly
-----------------------------------------------

[](#alternative-3-invoking-the-autoloader-directly)

If you do not wish to include autoload.php to load and setup the autoloader, you can invoke the autoloader directly:

```
require 'cakephparangodb/lib/ArangoDBClient/autoloader.php';
\ArangoDBClient\Autoloader::init();
```

How to use the CAKEPHP client
=============================

[](#how-to-use-the-cakephp-client)

Setting up the connection options
---------------------------------

[](#setting-up-the-connection-options)

In order to use Cakephp ArangoDB, you need to specify the connection options. currently its only available from core files of this client in future updates we will add functionality to change db config from app.php

For now you need to open yourProject/vendor/cakephparangodb/arangodb/lib/ArangoDBClient/Connect.php and change db config of $\_options according to your db config.

Convert Cakephp Models to ArangoDb supported models. Change your cakephp models to like below example
-----------------------------------------------------------------------------------------------------

[](#convert-cakephp-models-to-arangodb-supported-models-change-your-cakephp-models-to-like-below-example)

Here for example i am changing UsersTable Model.

```

```

Thats it. Now you can load model in your controller by using loadModel and use users Table of arangodb into controller like below example

\##Here i am giving some examples that how you can use models in controller \##FIND QUERY

Using Find
----------

[](#using-find)

```
$data = $this->Users->find('all');

```

Using Find with conditions
--------------------------

[](#using-find-with-conditions)

```
$data = $this->Users->find('all',['conditions'=>['name'=>'test','email'=>'test@gmail.com']]);

```

Using findById()
----------------

[](#using-findbyid)

```
$data = $this->Users->findById(10);

```

Using Find with select
----------------------

[](#using-find-with-select)

```
$data = $this->Users->find('all',['select'=>['name','email','status']]);

```

Using FindOne
-------------

[](#using-findone)

```
$data = $this->Users->findOne('all',['conditions'=>['email'=> $email]]);

```

advanced find with select , sort , limit
----------------------------------------

[](#advanced-find-with-select--sort--limit)

```
$data = $this->Users->find('all',['select'=>['name','email','status']]);
$data = $this->Users->find('all', ['conditions'=>['email'=>'test@gmail.com'],'order'=>['paydate'=> 'ASC'],'select'=>['name','email','status']]);

```

Using isUnique
--------------

[](#using-isunique)

```
$data = $this->Users->isUnique(['conditions'=>['email'=> $email]]);

```

Using Count
-----------

[](#using-count)

```
$data = $this->Users->count(['conditions'=>['email'=> $email]]);

```

\##Updation

Using updateById
----------------

[](#using-updatebyid)

```
$data = $this->Users->updateById(['email'=> $email],['id'=> 1]);

```

Using updateAll
---------------

[](#using-updateall)

```
$data = $this->Users->updateAll(['email'=> $email],['id'=> 1]);

```

\##deletion

deleteById

Using deleteById
----------------

[](#using-deletebyid)

```
$data = $this->Users->deleteById(1);

```

deleteAll

Using deleteAll
---------------

[](#using-deleteall)

```
$data = $this->Users->deleteAll(['email'=> $email]);

```

Using createOrUpdate()
----------------------

[](#using-createorupdate)

```
$data = $this->Users->createOrUpdate(['email'=> $email,'id'=> 10]);

```

Join
----

[](#join)

```
$data = $this->Users->findWithJoin('all',['contain'=> 'userdetails', 'conditions'=>['c.userid'=> 'u.id']]);
//Here c is refer for base table and u is for join table.

```

\##Save Data

```
$data = ['name'=>'shubham715', email'=> 'shubhamsharma715@gmail.com', 'status'=> 1];
$saveData = $this->Users->save($financeEntity);

```

Here lots of examples that we will update soon.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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/0b660c04af45d6ca2040a6aca16c3f9201c827d71e2a65a9ae54012fe2974655?d=identicon)[shubham715](/maintainers/shubham715)

---

Top Contributors

[![shubham715](https://avatars.githubusercontent.com/u/22466564?v=4)](https://github.com/shubham715 "shubham715 (16 commits)")

### Embed Badge

![Health badge](/badges/cakephparangodb-arangodb/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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