PhloTour
EN NL
16 / 30

Database & model

The model gives create, read, update and delete for free.

Read the docs →
.phlo
// type.note.phlo  ->  one file is the whole model
@ extends: model
static DB => %JSONDB(data.'note.json')
static columns = 'id,text'

// then, anywhere in the app:
type_note::create(text: 'hello world')
$rows = type_note::records(order: 'id DESC')
type_note::delete('id=?', $id)
		

No rows yet. Add one above.