PHPackages                             bugsheng/laravel-sql - 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. [Database &amp; ORM](/categories/database)
4. /
5. bugsheng/laravel-sql

ActiveLibrary[Database &amp; ORM](/categories/database)

bugsheng/laravel-sql
====================

No description

1.0.1(4y ago)016MITPHP

Since Dec 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bugsheng/laravel-sql)[ Packagist](https://packagist.org/packages/bugsheng/laravel-sql)[ RSS](/packages/bugsheng-laravel-sql/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

laravel-sql
-----------

[](#laravel-sql)

> 因为目前laravel框架中没有自带的完整输出sql语句的封装方法，查阅资料后决定封装成扩展，嫁接到系统项目中

### 用法

[](#用法)

```
// 示例查询语句
User::where('name', 'like', '%test%')->get();
// 完整sql获取
User::where('name', 'like', '%test%')->select(['*'])->sql();

// 示例查询语句
DB::table('users')->where('name', 'like', '%test%')->get();
// 完整sql获取
DB::table('users')->where('name', 'like', '%test%')->select(['*'])->sql();
```

- 上述示例中直接的**get()方法获取数据 实际上缺省了参数\['\*'\]**

框架要求
----

[](#框架要求)

Laravel &gt;= 5.5

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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 ~377 days

Total

2

Last Release

1649d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16681022?v=4)[第五焱陽](/maintainers/shenglin-php)[@shenglin-php](https://github.com/shenglin-php)

### Embed Badge

![Health badge](/badges/bugsheng-laravel-sql/health.svg)

```
[![Health](https://phpackages.com/badges/bugsheng-laravel-sql/health.svg)](https://phpackages.com/packages/bugsheng-laravel-sql)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)

PHPackages © 2026

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