承接 pyaesoneaung/to-raw-sql 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pyaesoneaung/to-raw-sql

最新稳定版本:v1.1.3

Composer 安装命令:

composer require pyaesoneaung/to-raw-sql

包简介

Get raw SQL from Laravel Query Builder

README 文档

README

Cover

GitHub Workflow Status Packagist Downloads

To Raw SQL

⚠️ The toRawSql() function is included by default in Laravel 10.15.0. You don't need to install this package if your Laravel version is greater than 10.14.1 ⚠️

Get raw SQL from Laravel Query Builder and Eloquent Builder

Installation

composer require pyaesoneaung/to-raw-sql

Usage

User::where('votes', '>', 100) ->orWhere(function ($query) { $query->where('name', 'Abigail') ->where('votes', '>', 50); }) ->toRawSql(); // "select * from `users` where `votes` > 100 or (`name` = 'Abigail' and `votes` > 50)"
DB::table('users') ->whereBetween('votes', [1, 100]) ->toRawSql(); // "select * from `users` where `votes` between 1 and 100"

Version History

  • 1.1.3
    • do not register the toRawSql() macro if the Laravel version is greater than 10.14.1
  • 1.1.2
    • throw ToRawSqlException when encountering PostgreSQL jsonb operator errors
  • 1.1.1
    • fixed boolean bind for pgsql
  • 1.1.0
    • support Illuminate\Database\Query\Builder
  • 1.0.2
    • support DateTimeInterface bind
  • 1.0.1
    • fixed string bind
  • 1.0.0
    • support Illuminate\Database\Eloquent\Builder

Testing

composer test

统计信息

  • 总下载量: 9.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 56
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 56
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固