定制 morrislaptop/laravel-query-builder-dump 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

morrislaptop/laravel-query-builder-dump

最新稳定版本:v0.2.1

Composer 安装命令:

composer require morrislaptop/laravel-query-builder-dump

包简介

Adds the ability to dump the query builder inline

README 文档

README

Screenshot of code

array:3 [
  "bindings" => array:6 [
    "select" => []
    "join" => []
    "where" => array:1 [
      0 => Illuminate\Support\Carbon {#736
        +"date": "2017-11-24 15:10:26.000000"
        +"timezone_type": 3
        +"timezone": "UTC"
      }
    ]
    "having" => []
    "order" => []
    "union" => []
  ]
  "sql" => "select * from `prizes` where `comment_id` is null and `release_at` < ? order by `release_at` asc"
  "raw" => "select * from `prizes` where `comment_id` is null and `release_at` < '2017-11-24 15:10:26' order by `release_at` asc"
]

Latest Version on Packagist Build Status Quality Score Total Downloads

This repository contains a dump method for the query builder, allowing you to dump your query inline. Similar to $collection->dump();

Installation

You can pull in the package via composer:

composer require morrislaptop/laravel-query-builder-dump --dev

The package will automatically register itself.

Usage

Simply call dump anywhere when constructing your query.

$users = DB::table('users')
           ->select('name', 'email as user_email')
           ->join('contacts', 'users.id', '=', 'contacts.user_id')
           ->union($first)
           ->dump()
           ->where('something', 'true')
           ->orWhere('name', 'John')
           ->orderBy('name', 'desc')
           ->groupBy('account_id')
           ->dump()
           ->offset(10)
           ->limit(5)
           ->having('account_id', '>', 100)
           ->get();

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email cr@igmorr.is instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-24