Prisma PHP Package: Warnings⚠️
This section provides important warnings for users of the Prisma PHP package. It is crucial to adhere to these guidelines to ensure stability and reliability in your application.
When declaring your database model in the prisma.schema
file, you must be careful about the following:
- Do not use
enum
. This feature is not supported.
enum Role {
USER
ADMIN
}
model RoleModel {
id String @id @default(cuid())
name Role
}
SHOW_ERRORS
.env SHOW_ERRORS=true
is a great way to debug your application. However, it is not recommended to use it in production. This is because it can expose sensitive information about your application to the public.
Warning
In production, it is recommended to set SHOW_ERRORS=false
in your .env
file. This will prevent sensitive information from being exposed to the public.
Copy the code below to your .env
file to set SHOW_ERRORS=true
in development and SHOW_ERRORS=false
in production, if it is not already set:
# SHOW ERRORS - Set to true to show errors in the browser for development only - Change this in production to false
SHOW_ERRORS=true
Conclusion
It is important to follow the guidelines provided in this section to ensure the security and stability of your application. By adhering to these warnings, you can prevent potential security vulnerabilities and ensure the reliability of your application.