For years, I've been making do with the outdated and ill-supported php-activerecord to do very simple insert and update operations for a tiny script that is for my own use and doesn't need to be a full-blown app with a front end for other users, etc.

Now that I'm using PHP 8, it appears that it's time to find something new to accomplish this very basic CRUD interaction with my MySQL database. A quick search of Packagist reveals that the most popular CRUD packages are all designed for Laravel, CakePHP, or similar.

Is there a PHP CRUD solution out there with a sizeable community of users that works with PHP 8 and doesn't require the use of a web application framework? I would prefer a Composer package, but would accept something else provided it's lightweight and easy to install and use.

1 Answer 1


You can use illuminate/database package

The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, SQL Server, and SQLite.

  • Usage Instructions

First, create a new "Capsule" manager instance.

Capsule aims to make configuring the library for usage outside of the Laravel framework.

Once the Capsule instance has been registered. You may use it like so:

  • Query Builder
  • Schema Builder
  • Eloquent ORM

.... Package Repository

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.