Skip to content

2. Models and Collection

Pranjal Pandey edited this page May 25, 2022 · 8 revisions

Model

A row in database is represented by a model in Arca. Arca can perform all magic due to models to create a new row, you just need to create a new model and save

//create a new model 
$user = $db->create('user');
$user->name = "John Doe";
$user->email = "John@test.com";
$user->save();

models use __get() and __set() magic methods

Clone this wiki locally