This is the database for a rewrite of db.etree.org. It is also a demonstration of soliantconsuting-apigility Doctrine entity API creation.
-
Clone the repository
git clone git@github.com:etreedb/etreedb-api -
Run composer
./composer.phar install --dev -
Create a doctrine-compatible database
-
Copy
config/development.config.php.disttoconfig/development.config.php -
Copy
config/autoload/local.php.disttoconfig/autoload/local.phpand edit for your database connection from 3. -
Run
./vendor/bin/doctrine-module orm:schema-tool:createto create the tables -
Run
./vendor/bin/doctrine-module data-fixture:import -
Run
php -S localhost:8090 -t public/ public/index.php -
Browse to
http://localhost:8090/Because the API has not been created yet take note no urls from /api/ resolve.
-
Click
Create API, give it a name. -
Select all entities except the Abstracts. You may choose to namespace the created resources. Click
Create Apiand be patient while work is done. -
Make a request to
GET http://localhost:8090/api/performerofAccept-Type: application/jsonorGET http://localhost:8090/api/etree_db/db/entity/performer
The final step in API module creation is a list of routes.