"faunadb-php" is a library built for using faunadb with PHP.
"faunadb-php" is still in development stages and has few basic features to go with.
- Downlaod the file and extarct in the project directory.
- To start with just include these line in the begining of the file.
require_once 'FaunaPhp/autoload.php';
$fauna = new FaunaPhp();
// Your commnd goes here
Further You can find all the new commands in "test.php" where all the test are going on.
- Connect to Faunna
$fauna->connectFauna($faunaKey);
Parameter | Description | Requirment |
---|---|---|
faunakey | secret key | required |
- Create Database
$fauna->createDatabase($name);
Parameter | Description | Requirment |
---|---|---|
name | name of the database | required |
- Create Collection
$fauna->createCollection($name);
Parameter | Description | Requirment |
---|---|---|
name | name of the collection | required |
- Set Default Collection
$fauna->setDefaultCollection($name);
Parameter | Description | Requirment |
---|---|---|
name | name of the collection | required |
- Use Default Collection
$fauna->useDefaultCollection();