2017 © Pedro Peláez
 

library laravel-query-builder-dump

Adds the ability to dump the query builder inline

image

morrislaptop/laravel-query-builder-dump

Adds the ability to dump the query builder inline

  • Friday, February 2, 2018
  • by morrislaptop
  • Repository
  • 2 Watchers
  • 6 Stars
  • 760 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 91 % Grown

The README.md

Query Builder Dump

Screenshot of code, (*1)

``` php 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" ], (*2)


[![Latest Version on Packagist](https://img.shields.io/packagist/v/morrislaptop/laravel-query-builder-dump.svg?style=flat-square)](https://packagist.org/packages/morrislaptop/laravel-query-builder-dump) [![Build Status](https://img.shields.io/travis/morrislaptop/laravel-query-builder-dump/master.svg?style=flat-square)](https://travis-ci.org/morrislaptop/laravel-query-builder-dump) [![Quality Score](https://img.shields.io/scrutinizer/g/morrislaptop/laravel-query-builder-dump.svg?style=flat-square)](https://scrutinizer-ci.com/g/morrislaptop/laravel-query-builder-dump) [![Total Downloads](https://img.shields.io/packagist/dt/morrislaptop/laravel-query-builder-dump.svg?style=flat-square)](https://packagist.org/packages/morrislaptop/laravel-query-builder-dump) 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: ``` bash composer require morrislaptop/laravel-query-builder-dump --dev

The package will automatically register itself., (*3)

Usage

Simply call dump anywhere when constructing your query., (*4)

$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

bash $ composer test, (*5)

Contributing

Please see CONTRIBUTING for details., (*6)

Security

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

Credits

License

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

The Versions

02/02 2018

dev-master

9999999-dev

Adds the ability to dump the query builder inline

  Sources   Download

MIT

The Development Requires

02/02 2018

dev-analysis-zD0xAJ

dev-analysis-zD0xAJ

Adds the ability to dump the query builder inline

  Sources   Download

MIT

The Development Requires

01/12 2017

v0.2.1

0.2.1.0

Adds the ability to dump the query builder inline

  Sources   Download

MIT

The Development Requires

24/11 2017

v0.2.0

0.2.0.0

Adds the ability to dump the query builder inline

  Sources   Download

MIT

The Development Requires

24/11 2017

v0.1.0

0.1.0.0

Adds the ability to dump the query builder inline

  Sources   Download

MIT

The Development Requires