voicut31 / api_generator
API Generator
v0.3.0
2026-03-16 08:52 UTC
Requires
- doctrine/orm: ^2.6
This package is auto-updated.
Last update: 2026-03-16 08:57:14 UTC
README
It's generate api endpoints based on database tables
Install
Install composer
brew install composer
Install packages
composer install
Configure the aplication
Usage
...
use ApiGenerator\Generator;
$configuration = new \Doctrine\DBAL\Configuration();
$conn = \Doctrine\DBAL\DriverManager::getConnection($config['database'], $configuration);
...
$generator = new Generator($conn);
$generator->api($module, $id, $params);
Available request methods
'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'