Skip to content
On this page

Leaf Db

Leaf Db is a lightweight but powerful query builder which allows you quickly write dynamic queries, validate and perform operations on the data in just a single line of code.

You can install Leaf Db with Leaf CLI:

leaf install db

Or with composer:

composer require leafs/db


There are currently two versions of leaf db. Click on your version of choice to view it's docs.

Sticking to v1

If you don't use leaf auth, it is perfectly fine to stick to leaf db v1. However, if you use Leaf Auth, you will need to switch to v2 of leaf db.

You can quickly upgrade by running the installation command above.

Intro has loaded