big-shark / sql-to-builder
SQL to query builder
0.0.2
2019-12-15 19:38 UTC
Requires
- php: >=7.1.0
- greenlion/php-sql-parser: ^4.0
Requires (Dev)
- phpunit/phpunit: ^7.0|^8.0
- scrutinizer/ocular: ~1.1
This package is auto-updated.
Last update: 2024-10-27 05:14:57 UTC
README
This package will help you convert from sql query to laravel query builder
Install
Via Composer
$ composer require big-shark/sql-to-builder
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
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email BigShark666@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.