https://github.com/mathisburger/surrealdb.php
Database driver for surrealdb and php
https://github.com/mathisburger/surrealdb.php
database-driver php surrealdb surrealdb-driver
Last synced: about 1 month ago
JSON representation
Database driver for surrealdb and php
- Host: GitHub
- URL: https://github.com/mathisburger/surrealdb.php
- Owner: MathisBurger
- License: mit
- Created: 2022-09-25T15:03:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-26T12:12:09.000Z (over 2 years ago)
- Last Synced: 2025-03-31T02:21:56.682Z (3 months ago)
- Topics: database-driver, php, surrealdb, surrealdb-driver
- Language: PHP
- Homepage: https://packagist.org/packages/mathisburger/surrealdb
- Size: 34.2 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SurrealDb.php
SurrealDb.php is a driver written in php for the surrealDb database. It supports some
basic features that can be used to perform actions on the database.
It uses the websocket API of the database.# Installation
Installation is quite easy with
```shell
composer require mathisburger/surrealdb
```# Usage
Just require the package via composer and follow the following guide how to create
a new entry in the database:```php
// Only needed for plain PHP scripts that do not use a framework like symfony
include './vendor/autoload.php';use MathisBurger\SurrealDb\SurrealDriver;
$conn = new SurrealDriver('ws://127.0.0.1:8000/rpc');
$conn->login('root', 'root');
$conn->useDatabase('test', 'test');
$conn->create('user', ['username' => 'Mathis', 'password' => 'Test']);
```# License
This project is MIT licensed.