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.dist
toconfig/development.config.php
-
Copy
config/autoload/local.php.dist
toconfig/autoload/local.php
and edit for your database connection from 3. -
Run
./vendor/bin/doctrine-module orm:schema-tool:create
to 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 Api
and be patient while work is done. -
Make a request to
GET http://localhost:8090/api/performer
ofAccept-Type: application/json
orGET http://localhost:8090/api/etree_db/db/entity/performer
The final step in API module creation is a list of routes.