PHP code example of sciactive / nymph-server
1. Go to this page and download the library: Download sciactive/nymph-server library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sciactive / nymph-server example snippets
use Nymph\Nymph;
Nymph::configure([
'MySQL' => [
'host' => 'your_db_host',
'database' => 'your_database',
'user' => 'your_user',
'password' => 'your_password'
]
]);
// You are set up. Now make a class like `MyEntity` and use it.
$myEntity = new MyEntity();
$myEntity->myVar = "myValue";
$myEntity->save();
$allMyEntities = Nymph::getEntities(['class' => 'MyEntity']);