mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-27 18:10:27 +01:00
Preload label
This commit is contained in:
@@ -13,7 +13,9 @@ export default class ProjectsController {
|
|||||||
.orderBy('id', 'asc')
|
.orderBy('id', 'asc')
|
||||||
.preload('cover')
|
.preload('cover')
|
||||||
.preload('description')
|
.preload('description')
|
||||||
.preload('tags')
|
.preload('tags', (tags) => {
|
||||||
|
tags.preload('label')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default class Projects extends BaseSchema {
|
|||||||
.onDelete('CASCADE')
|
.onDelete('CASCADE')
|
||||||
table.string('url').notNullable()
|
table.string('url').notNullable()
|
||||||
table
|
table
|
||||||
.integer('file_id')
|
.integer('cover_id')
|
||||||
.unsigned()
|
.unsigned()
|
||||||
.references('files.id')
|
.references('files.id')
|
||||||
.onDelete('CASCADE')
|
.onDelete('CASCADE')
|
||||||
|
|||||||
Reference in New Issue
Block a user