PHPackages                             arafatkn/laravel-datastore - 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. arafatkn/laravel-datastore

Abandoned → [appsero/laravel-datastore](/?search=appsero%2Flaravel-datastore)Package[Database &amp; ORM](/categories/database)

arafatkn/laravel-datastore
==========================

A package for using google datastore as a database driver.

0.0.4(4y ago)13MITPHPPHP ^7.3|^8.0

Since Nov 16Pushed 3y agoCompare

[ Source](https://github.com/arafatkn/laravel-datastore)[ Packagist](https://packagist.org/packages/arafatkn/laravel-datastore)[ Docs](https://github.com/arafatkn/laravel-datastore)[ RSS](/packages/arafatkn-laravel-datastore/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

Datastore Driver for Laravel
============================

[](#datastore-driver-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/705c6829d87afea067f8681eca23c8573ff2f5c2693c1860e242991651e0f52e/68747470733a2f2f706f7365722e707567782e6f72672f6170707365726f2f6c61726176656c2d6461746173746f72652f76)](https://camo.githubusercontent.com/705c6829d87afea067f8681eca23c8573ff2f5c2693c1860e242991651e0f52e/68747470733a2f2f706f7365722e707567782e6f72672f6170707365726f2f6c61726176656c2d6461746173746f72652f76)[![License](https://camo.githubusercontent.com/e4254fb54c8c7e02a3b2c04546f129315594db397ad4dd66679c897e27a0c445/68747470733a2f2f706f7365722e707567782e6f72672f6170707365726f2f6c61726176656c2d6461746173746f72652f6c6963656e7365)](https://camo.githubusercontent.com/e4254fb54c8c7e02a3b2c04546f129315594db397ad4dd66679c897e27a0c445/68747470733a2f2f706f7365722e707567782e6f72672f6170707365726f2f6c61726176656c2d6461746173746f72652f6c6963656e7365)

A package for using google datastore as a database driver.

---

By using this package, you can use `query builder` and `eloquent` to access data from datastore.

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

[](#installation)

You can install the package via composer:

```
composer require appsero/laravel-datastore
```

If you are using Laravel Package Auto-Discovery, you don't need you to manually add the ServiceProvider.

#### Without auto-discovery:

[](#without-auto-discovery)

If you don't use auto-discovery, add the below ServiceProvider to the `$providers` array in `config/app.php` file.

```
Appsero\LaravelDatastore\DatastoreServiceProvider::class,
```

Roadmap
-------

[](#roadmap)

- Data read using query builder (available).
- Data read using eloquent model (available).
- Data insert (available).
- Data update (Using query builder, model coming soon).
- Data delete (available).
- Cursor Paginate (soon).
- Relations (soon).

Usage
-----

[](#usage)

You need to add `datastore` connection in `config/database.php` file.

```
'connections' => [
    ...
    'datastore' => [
        'driver' => 'datastore',
        'key_file_path' => env('GOOGLE_APPLICATION_CREDENTIALS', 'gcloud-credentials.json'),
        'prefix' => env('DATASTORE_PREFIX', null),
    ],
    ...
],
```

### Access using Eloquent Model

[](#access-using-eloquent-model)

You need to extend `Appsero\LaravelDatastore\Eloquent\Model` class instead of laravel's default eloquent model class.

**Example-**

```
