Top 10 PHP Query Builder Projects
-
Project mention: Cash: A small jQuery alternative for modern browsers | news.ycombinator.com | 2024-11-02
Thanks. It's a small custom framework built from libraries, some custom, some third party.
- File based HTTP router running on top of https://frankenphp.dev/
- ORM/SQL with: https://github.com/cycle/orm but this is preference. Anything works. From SQL builders to ORMs.
I'll try to explain their form handling:
Forms almost always POST to their own GET URL.
If you GET /user/save you'll get back HTML and `` to build the form.<p>If you POST /user/save you're expected to pass the entire form data PLUS an "operation" parameter which is used by the backend to decide what should be done and returned.<p>For example if user clicks [add new user] button, the "operation" parameter has value of "btnNewUser.click".<p>Why pass operation parameter? Because business forms can have more than just a [submit] button.<p>For example, there might be a datagrid filter value being changed (operation: "txtFilter.change"), or perhaps a dropdown search to select a city name from a large list (operation: "textCitySearch.change"), it can be a postal code to address lookup (operation: "txtPostalCode.change"), etc.<p>On the backend, the pseudocode looks somewhat like this but it's cleaner/safer because of encapsulation, validation, error handling, data sanitization, model binding and csrf/xss protection:<p><pre><code> function user_save($operation) {
-
Cloudways
Cloudways' Black Friday Offer - 1st Choice of Developers. Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.
-
laravel-eloquent-query-cache
Adding cache on your Laravel Eloquent queries' results is now a breeze.
-
-
-
-
-
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
pecee-pixie
Lightweight, easy-to-use querybuilder for PHP inspired by Laravel Eloquent - but with less overhead.
-
laravel-cycle-orm-adapter
🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.
I use this approach in my wayofdev/laravel-cycle-orm-adapter package. The configuration file can be viewed here: config/cycle.php
-
PHP Query Builder discussion
PHP Query Builder related posts
Index
What are some of the best open-source Query Builder projects in PHP? This list will help you:
Project | Stars | |
---|---|---|
1 | Cycle ORM | 1,237 |
2 | laravel-eloquent-query-cache | 1,062 |
3 | Aura.SqlQuery | 450 |
4 | db | 134 |
5 | PdoOne | 108 |
6 | DB | 106 |
7 | to-raw-sql | 54 |
8 | pecee-pixie | 41 |
9 | laravel-cycle-orm-adapter | 24 |
10 | sequel-mongo-php | 9 |