ahsanabrar/laravel-neo4j

Laravel的Neo4j图数据库包装器。

此包的官方仓库似乎已丢失,因此该包已被冻结。

v0.2.0 2018-08-04 15:19 UTC

This package is auto-updated.

Last update: 2021-12-09 07:49:37 UTC


README

Laravel的Neo4j图数据库包装器。

安装

composer require AhsanAbrar/laravel-neo4j

配置

创建config/cypher.php文件

<?php

return [
    'ssl' => false,
    'connection' => 'default',
    'host'   => env('DB_HOST', 'localhost'),
    'port'   => env('DB_PORT', '7474'),
    'username' => env('DB_USERNAME', 'neo4j'),
    'password' => env('DB_PASSWORD', 'neo4j')
];

运行Cypher查询

use Ahsan\Neo4j\Facade\Cypher;

Cypher::run("MATCH (n) RETURN n");

返回Graphaware结果