Ringkasan class, binding container, dan method publik yang tersedia pada Lanjit 0.2.0.
Referensi ini mencakup API publik utama versi 0.2.0. Karena statusnya Beta, signature dapat berubah pada rilis berikutnya.
Application dan container
| API |
Method utama |
Application |
configure(), path(), boot(), listen(), handle() |
ApplicationBuilder |
withRouting(), withProviders(), withMiddleware(), withExceptions(), create() |
Container |
bind(), singleton(), instance(), alias(), has(), make(), call() |
ConfigRepository |
get(), set() |
HTTP dan routing
| API |
Method atau property utama |
Router |
get(), post(), put(), patch(), delete(), options(), any(), group(), resource(), fallback(), url(), routes() |
Request |
method, url, path, query, params, headers, cookies, input(), header(), all(), body(), validate() |
Response |
status(), header(), send(), json(), redirect(), cookie(), forgetCookie(), download(), stream(), view() |
HttpException |
status, message, details |
Basis data
| API |
Method utama |
DatabaseManager |
connection(), table(), transaction(), disconnect(), disconnectAll() |
QueryBuilder |
where(), orderBy(), limit(), get(), first(), find(), insert(), update(), delete() |
Model |
fill(), toJSON(), save(), query(), all(), find(), create(), useDatabase() |
SchemaBuilder |
create(), dropIfExists(), hasTable() |
Blueprint |
id(), string(), text(), integer(), boolean(), timestamp(), timestamps() |
Modifier kolom yang tersedia adalah nullable(), unique(), primary(), autoIncrement(), default(), dan references().
Binding layanan
| Binding |
Layanan |
app |
Instance aplikasi |
router |
Router aplikasi |
config |
Repository konfigurasi |
db |
Pengelola basis data |
cache |
Cache memori |
events |
Event dispatcher |
files |
Filesystem berakar di storage/app |
log |
Logger JSON Lines |
session.store |
Penyimpanan sesi dalam memori |
rate.limiter |
Rate limiter dalam memori |
auth |
Pengelola autentikasi |
gate |
Gerbang otorisasi |
hash |
Hashing scrypt |
crypt |
Enkripsi AES-256-GCM |
queue |
Antrean dalam memori |
schedule |
Penjadwal callback |
Validasi
Rule bawaan: required, string, number, integer, boolean, email, min, max, in, dan confirmed. Daftarkan rule tambahan melalui Validator.extend(name, callback).