0.0.24 • Published 4 months ago

prisma-client-php v0.0.24

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Prisma Client PHP

Prisma Client PHP is a standalone package that brings Prisma ORM functionality to PHP, allowing seamless interaction with a Prisma-managed database. It enables developers to work with database models using an elegant, type-safe, and class-based approach, similar to how Prisma works with TypeScript.

Introduction

Prisma Client PHP is a key component of the create-prisma-php-app package, which provides a fast and efficient PHP environment for development. It features component-based architecture and file-based routing, similar to Next.js and React, but optimized for PHP.

This package is responsible for integrating and managing the Prisma ORM layer in PHP. It generates convenient PHP classes based on your database models, replicating the behavior of npx prisma generate in TypeScript but tailored for PHP. This allows developers to effortlessly access, modify, and manage database records using a structured and intuitive API.

Prerequisites

Ensure that your system meets the following requirements before installing Prisma Client PHP:

Installation

Follow these steps to install and set up Prisma Client PHP:

  1. Open your terminal.
  2. Generate a new Prisma PHP project in your desired directory by running:

    npx create-prisma-php-app@latest
  3. Remember to chose Prisma PHP ORM when prompted.

  4. Generate Prisma Client PHP classes by running:

    npx ppo generate

This command will convert your schema.prisma models into PHP classes, enabling you to interact with your database using these generated classes.

Adding Prisma Client PHP to an Existing Prisma PHP Project

To integrate Prisma Client PHP into an existing Prisma PHP project, follow these steps:

  1. Open your terminal.

  2. Install Prisma Client PHP globally by running:

    npm install -g prisma-client-php@latest

    This command installs the Prisma Client PHP package globally, making it available for use in any PHP project.

  3. Initialize Prisma Client PHP in your project by running:

    npx ppo init

    This command sets up all necessary packages for Prisma Client PHP to function within your existing project.

Features

  • Auto-Generated PHP Classes: Prisma Client PHP automatically generates PHP classes based on your Prisma schema.
  • Type-Safe Database Queries: Work with your database in a structured and predictable way.
  • Seamless ORM Integration: Leverages Prisma ORM’s powerful query engine within a PHP environment.
  • Component-Based Development: Works alongside create-prisma-php-app, providing a modern development experience.
  • File-Based Routing: Inspired by Next.js and React, simplifying route management in PHP projects.

Contributing

We welcome contributions to Prisma Client PHP! If you have suggestions, bug reports, or pull requests, feel free to open an issue or submit a PR in the repository.

License

Prisma Client PHP is licensed under the MIT License. See the LICENSE file for more details.

Author

Prisma Client PHP is developed and maintained by The Steel Ninja Code.

Contact Us

For support, feedback, or inquiries, reach out to us at thesteelninjacode@gmail.com.

0.0.24

4 months ago

0.0.23

4 months ago

0.0.22

4 months ago

0.0.21

4 months ago

0.0.20

4 months ago

0.0.19

4 months ago

0.0.18

4 months ago

0.0.17

4 months ago

0.0.16

4 months ago

0.0.15

4 months ago

0.0.14

4 months ago

0.0.13

4 months ago

0.0.12

4 months ago

0.0.11

4 months ago

0.0.10

5 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago