PHP code example of bitshost / php-crud-api-generator
1. Go to this page and download the library: Download bitshost/php-crud-api-generator 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/ */
bitshost / php-crud-api-generator example snippets
bash
# 1. Generate secure secrets (JWT secret + API keys)
php scripts/generate_secrets.php
# 2. Update config/api.php with generated secrets
# 3. Create admin user in database
php scripts/create_user.php admin [email protected] YourSecurePassword123! admin
bash
# Access the auto-generated OpenAPI spec
curl http://localhost:8000/index.php?action=openapi
# Or visit in browser:
http://localhost:8000/index.php?action=openapi