Database
Atom's database package gives you tools to connect to a database, evolve its schema, and work with stored data. You can run SQL directly, build queries in PHP, or use models to map rows to objects. These APIs work together, so you can choose the one that fits each operation.
| Feature | Use it to |
|---|---|
| Configuration | Register database services and configure a connection. |
| Migrations and seeders | Apply repeatable schema changes and populate initial data. |
| Query builder | Build queries with filters, joins, sorting, and limits. |
| Query execution | Run SQL with bound values and read the results. |
| Models | Map rows to PHP objects and save changes through those objects. |
| Relations | Describe how models are connected and load related records. |