Skip to content

Tbl::classYour schema. In PHP constants.

Keep writing SQL. Let your IDE help with table names, columns, and relationships.

php
use Tbl\Tbl;

Tbl::users;                            // 'users'
Tbl::users__id('u');                    // 'u.id'
Tbl::on__posts__users('p', 'u');         // 'p.user_id = u.id'

These examples use full naming and a foreign key from posts.user_id to users.id.

Released under the MIT License.