Models

Representation of your Database tables.

In your console/terminal/cmd/poweshell/gitbash or other console tool go to your project directory and type:

$ php BoosterCLI make: model user

Now you could go to:

app/Models/user.php

You will find the next code:

<?php
namespace App\Models;
use Libs\BoosterORM\Modelo;
class User extends Modelo
{
    protected static $table = 'users';
}
?>

Now you could see a static property table:

You could create one model for every table, but it does not mean that you are obligate to use models, if you want to use MVC thats the best way to fit everything automatically.

Instead of MVC if some table is not going to be use so much or you does not want to use MVC, Booster provide a BoosterQueryBuilder Library to create fluent querys without the creation of models.

Feel free to use Models in certain tables or queryBuilder its totally free to you.

Last updated

Was this helpful?