This package will help you to convert sql query to laravel query builder
Via Composer
$ composer require big-shark/sql-to-builder
$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()"
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.