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 1w 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 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

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

1602d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9750f6268acf5c10734b96cb56e9592094fef3016d74c8f908c6804257225ca?d=identicon)[shenglin-php](/maintainers/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

[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[aglipanci/laravel-eloquent-case

Adds CASE statement support to Laravel Query Builder.

115157.2k](/packages/aglipanci-laravel-eloquent-case)

PHPackages © 2026

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