@codenameryuu/adonis-lucid-auto-preload 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @codenameryuu/adonis-lucid-auto-preload
|
|
2
2
|
|
|
3
3
|
Auto-preload multiple relationships when retrieving Lucid models on Adonis JS 7.
|
|
4
4
|
|
|
@@ -9,13 +9,13 @@ Auto-preload multiple relationships when retrieving Lucid models on Adonis JS 7.
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
yarn add @
|
|
12
|
+
yarn add @codenameryuu/adonis-lucid-auto-preload
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Configure
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
node ace configure @
|
|
18
|
+
node ace configure @codenameryuu/adonis-lucid-auto-preload
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
@@ -34,7 +34,7 @@ Relationships will be auto-preloaded for `find` , `all` and `paginate` queries.
|
|
|
34
34
|
import { BaseModel, column, hasMany, HasMany } from '@adonisjs/lucid/orm'
|
|
35
35
|
import { compose } from '@adonisjs/core/helpers'
|
|
36
36
|
|
|
37
|
-
import { AutoPreload } from '@
|
|
37
|
+
import { AutoPreload } from '@codenameryuu/adonis-lucid-auto-preload'
|
|
38
38
|
|
|
39
39
|
import Post from '#models/post'
|
|
40
40
|
|
|
@@ -75,7 +75,7 @@ import { BaseModel, column, hasMany, HasMany } from '@adonisjs/lucid/orm'
|
|
|
75
75
|
import type { ModelQueryBuilderContract } from '@adonisjs/lucid/types/model'
|
|
76
76
|
import { compose } from '@adonisjs/core/helpers'
|
|
77
77
|
|
|
78
|
-
import { AutoPreload } from '@
|
|
78
|
+
import { AutoPreload } from '@codenameryuu/adonis-lucid-auto-preload'
|
|
79
79
|
|
|
80
80
|
import Post from '#models/post'
|
|
81
81
|
|
|
@@ -142,7 +142,7 @@ class Post extends BaseModel {
|
|
|
142
142
|
import { BaseModel, column, hasMany, HasMany } from '@adonisjs/lucid/orm'
|
|
143
143
|
import { compose } from '@adonisjs/core/helpers'
|
|
144
144
|
|
|
145
|
-
import { AutoPreload } from '@
|
|
145
|
+
import { AutoPreload } from '@codenameryuu/adonis-lucid-auto-preload'
|
|
146
146
|
|
|
147
147
|
import Post from '#models/post'
|
|
148
148
|
|
|
@@ -186,7 +186,7 @@ We will use the following model for our methods examples.
|
|
|
186
186
|
import { BaseModel, column, hasOne, HasOne, hasMany, HasMany } from '@adonisjs/lucid/orm'
|
|
187
187
|
import { compose } from '@adonisjs/core/helpers'
|
|
188
188
|
|
|
189
|
-
import { AutoPreload } from '@
|
|
189
|
+
import { AutoPreload } from '@codenameryuu/adonis-lucid-auto-preload'
|
|
190
190
|
|
|
191
191
|
import Profile from '#models/profile'
|
|
192
192
|
import Post from '#models/post'
|
|
@@ -274,7 +274,7 @@ When using route model binding, you cannot use `without` , `withOnly` and `witho
|
|
|
274
274
|
import { BaseModel, column, hasOne, HasOne, hasMany, HasMany } from '@adonisjs/lucid/orm'
|
|
275
275
|
import { compose } from '@adonisjs/core/helpers'
|
|
276
276
|
|
|
277
|
-
import { AutoPreload } from '@
|
|
277
|
+
import { AutoPreload } from '@codenameryuu/adonis-lucid-auto-preload'
|
|
278
278
|
|
|
279
279
|
import Profile from '#models/profile'
|
|
280
280
|
import Post from '#models/post'
|
|
@@ -308,8 +308,8 @@ class User extends compose(BaseModel, AutoPreload) {
|
|
|
308
308
|
|
|
309
309
|
## Contributing
|
|
310
310
|
|
|
311
|
-
Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/
|
|
311
|
+
Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/codenameryuu/adonis-lucid-auto-preload/issues). You can also take a look at the [contributing guide](https://github.com/codenameryuu/adonis-lucid-auto-preload/blob/master/CONTRIBUTING.md).
|
|
312
312
|
|
|
313
313
|
## License
|
|
314
314
|
|
|
315
|
-
This project is [MIT](https://github.com/
|
|
315
|
+
This project is [MIT](https://github.com/codenameryuu/adonis-lucid-auto-preload/blob/master/LICENSE.md) licensed.
|
package/package.json
CHANGED