Skip to content

Commit

Permalink
docs: change Prisma client import on README
Browse files Browse the repository at this point in the history
  • Loading branch information
wahyubucil committed Mar 31, 2022
1 parent 3c2206a commit 7655944
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Import the Prisma Client from `@ioc/Adonis/Addons/Prisma`. For example:

```ts
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import prisma from '@ioc:Adonis/Addons/Prisma'
import { prisma } from '@ioc:Adonis/Addons/Prisma'

export default class UsersController {
public async index({}: HttpContextContract) {
Expand Down Expand Up @@ -208,7 +208,7 @@ Every seeder file must extend the `PrismaSeederBase` class and implement the `ru
```ts
// prisma/seeders/User.ts

import prisma, { PrismaSeederBase } from '@ioc:Adonis/Addons/Prisma'
import { prisma, PrismaSeederBase } from '@ioc:Adonis/Addons/Prisma'

export default class UserSeeder extends PrismaSeederBase {
public static developmentOnly = false
Expand Down Expand Up @@ -274,7 +274,7 @@ node ace prisma-seeder:make User --dev
Or, if you want to make an existing seeder to development only, just change `developmentOnly` property to `true` on the implementation. For example:

```ts
import prisma, { PrismaSeederBase } from '@ioc:Adonis/Addons/Prisma'
import { prisma, PrismaSeederBase } from '@ioc:Adonis/Addons/Prisma'

export default class UserSeeder extends PrismaSeederBase {
public static developmentOnly = true // <-- change this
Expand Down

0 comments on commit 7655944

Please sign in to comment.