PHP Commands
Essential CLI tools to manage your Prisma PHP application, generate classes, and handle updates.
Create Project
Begin your journey by scaffolding a new application. This command sets up the latest version of the framework.
npx create-prisma-php-app@latest
Generate Classes
Automatically generate PHP classes based on your prisma/schema.prisma file.
Classes are output to src/Lib/Prisma/Classes.
npx ppo generate
Update Project
Warning: Potential Data Overwrite
Executing npx pp update project will replace default framework files. Custom files are generally safe, but always commit to Git before running this to ensure you can revert changes if needed.
If you want this file to be completely ignored by the updater, add it to the excludeFiles array in prisma-php.json. For example:
"./prisma/schema.prisma"
Note: excluding this file prevents it from being overwritten — but it also means you will not receive any future core updates for this file. To apply upstream fixes or improvements later, remove it from excludeFiles and re-run the update, or manually merge changes from the core.
Update the complete project structure to the latest version. This ensures your Prisma PHP core files and dependencies are up to date.
npx pp update project
Configuration
To proceed with updates, your project requires a prisma-php.json file in the root directory.
{
"projectName": "prisma-php-docs",
"projectRootPath": "D:\\xampp\\htdocs\\projects\\prisma-php-docs",
"phpEnvironment": "XAMPP",
"phpRootPathExe": "C:\\xampp\\php\\php.exe",
"bsTarget": "http://localhost/projects/prisma-php-docs/",
"bsPathRewrite": {
"^/": "/projects/prisma-php-docs/"
},
"backendOnly": false,
"swaggerDocs": false,
"tailwindcss": true,
"typescript": true,
"websocket": false,
"mcp": false,
"prisma": true,
"docker": false,
"version": "4.0.5",
"excludeFiles": [
"./prisma/schema.prisma",
"./.env",
"./src/app/layout.php",
"./tailwind.config.js",
"./src/app/index.php",
"./composer.json"
]
}
Understanding excludeFiles
The excludeFiles array prevents specific files from being overwritten during an update.
If you wish to force a full reset of all files, set this to an empty array: [].