This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-08-05T15:42:19.499Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"province_id": 1, "name": "KAB. ACEH SELATAN"}, | |
{"province_id": 1, "name": "KAB. ACEH TENGGARA"}, | |
{"province_id": 1, "name": "KAB. ACEH TIMUR"}, | |
{"province_id": 1, "name": "KAB. ACEH TENGAH"}, | |
{"province_id": 1, "name": "KAB. ACEH BARAT"}, | |
{"province_id": 1, "name": "KAB. ACEH BESAR"}, | |
{"province_id": 1, "name": "KAB. PIDIE"}, | |
{"province_id": 1, "name": "KAB. ACEH UTARA"}, | |
{"province_id": 1, "name": "KAB. SIMEULUE"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"id": 1, "name": "ACEH"}, | |
{"id": 2, "name": "SUMATERA UTARA"}, | |
{"id": 3, "name": "SUMATERA BARAT"}, | |
{"id": 4, "name": "RIAU"}, | |
{"id": 5, "name": "JAMBI"}, | |
{"id": 6, "name": "SUMATERA SELATAN"}, | |
{"id": 7, "name": "BENGKULU"}, | |
{"id": 8, "name": "LAMPUNG"}, | |
{"id": 9, "name": "KEPULAUAN BANGKA BELITUNG"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $ adonis make:trait SoftDelete | |
class SoftDelete { | |
register (Model, customOptions = {}) { | |
const deletedAtColumn = customOptions.name || `${Model.table}.deleted_at`; | |
Model.addGlobalScope(builder => { | |
builder.whereNull(deletedAtColumn); | |
}, 'soft_delete'); |