Instalasi dan Konfigurasi
Pastikan file .env atau konfigurasi database sudah diatur:
NexaModel · Storage() · NexaDb
$this->Storage('news')->where()->first();Konfigurasi Database
Pastikan file .env atau konfigurasi database sudah diatur:
DB_HOST=localhost
DB_USERNAME=root
DB_PASSWORD=your_password
DB_DATABASE=your_database
DB_PORT=3306
DB_CHARSET=utf8mb4
Membuat Model
<?php
namespace App\Models;
use App\System\NexaModel;
class User extends NexaModel
{
protected $table = 'users';
protected $fillable = ['name', 'email', 'password'];
// Custom methods here
}
Lanjut
Topik sebelumnya: Pengantar. Topik berikutnya: Fitur Utama. Lihat juga Models, Events, Helper & template, daftar dokumentasi.