PHPackages                             big-shark/sql-to-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. big-shark/sql-to-builder

ActiveLibrary

big-shark/sql-to-builder
========================

SQL to query builder

0.0.2(6y ago)3082.4k↓50%8[4 issues](https://github.com/big-shark/sql-to-builder/issues)[1 PRs](https://github.com/big-shark/sql-to-builder/pulls)MITPHPPHP &gt;=7.1.0CI failing

Since Jan 26Pushed 5y ago3 watchersCompare

[ Source](https://github.com/big-shark/sql-to-builder)[ Packagist](https://packagist.org/packages/big-shark/sql-to-builder)[ Docs](https://github.com/big-shark/sql-to-builder)[ RSS](/packages/big-shark-sql-to-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

sql-to-builder
==============

[](#sql-to-builder)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c6ef9fb77853361816474a294f216a99d13a60eaf98a14ead1fa4c49aa5236f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6269672d736861726b2f73716c2d746f2d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/big-shark/sql-to-builder)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/67f5c7cc9de6dc0ac81805fe838d0c4e066339e4863ebc7886bf444aa6885521/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4269672d536861726b2f73716c2d746f2d6275696c6465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/big-shark/sql-to-builder)[![Coverage Status](https://camo.githubusercontent.com/d199b7ac49492584ca1c42f50f3b818de03ee61536139434d7515a8de8d5c812/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6269672d736861726b2f73716c2d746f2d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/big-shark/sql-to-builder/code-structure)[![Quality Score](https://camo.githubusercontent.com/422a14194fe386364067acd8c3e753bb6772390975fea54f066f8df8ab3b5715/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6269672d736861726b2f73716c2d746f2d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/big-shark/sql-to-builder)[![Total Downloads](https://camo.githubusercontent.com/c6715ac92f209ad3081beb354b2e36a3d3bc2e0df641416bc2f4af1b088951d0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6269672d736861726b2f73716c2d746f2d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/big-shark/sql-to-builder)

This package will help you convert from sql query to laravel query builder

Install
-------

[](#install)

Via Composer

```
$ composer require big-shark/sql-to-builder
```

Usage
-----

[](#usage)

```
$builder = new \BigShark\SQLToBuilder\BuilderClass('SELECT a, b, c  FROM some_table WHERE d > 5');
echo $builder->convert();//"DB::table('some_table')->select('a', 'b', 'c')->where('d', '>', 5)->get()"
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Maxim Soloviev](https://github.com/Big-Shark)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1419 days

Total

2

Last Release

2346d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.3.0

0.0.2PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/82c6dd68dacdf8c35f8b309ef742a858921d3e52b5517ce3f187a64252bb6731?d=identicon)[Big\_Shark](/maintainers/Big_Shark)

---

Top Contributors

[![Big-Shark](https://avatars.githubusercontent.com/u/646054?v=4)](https://github.com/Big-Shark "Big-Shark (61 commits)")[![Quiss](https://avatars.githubusercontent.com/u/4972114?v=4)](https://github.com/Quiss "Quiss (3 commits)")[![klermonte](https://avatars.githubusercontent.com/u/2529340?v=4)](https://github.com/klermonte "klermonte (1 commits)")

---

Tags

sql-to-builderbig-shark

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/big-shark-sql-to-builder/health.svg)

```
[![Health](https://phpackages.com/badges/big-shark-sql-to-builder/health.svg)](https://phpackages.com/packages/big-shark-sql-to-builder)
```

###  Alternatives

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[rexshijaku/sql-to-laravel-builder

SQL to Laravel Query Builder

18925.9k1](/packages/rexshijaku-sql-to-laravel-builder)[thecodingmachine/tdbm

The Database Machine is a PHP ORM that requires no configuration. The object model is deduced from the database model.

123174.9k6](/packages/thecodingmachine-tdbm)[circle/doctrine-rest-driver

Use a REST API as if it was your local database

15634.5k](/packages/circle-doctrine-rest-driver)[hermawan/codeigniter4-datatables

Serverside Datatables library for CodeIgniter4

10943.0k3](/packages/hermawan-codeigniter4-datatables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
