Download the PHP package haru0/eloquent-sql-dumper without Composer

On this page you can find all versions of the php package haru0/eloquent-sql-dumper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package eloquent-sql-dumper

CircleCI SymfonyInsight

Eloquent SQL dumper

This Laravel package introduces simple service for dumping SQL with binded values.

This repository originated from my personal blog, and aims to briefly explain advantages of Laravel's Illuminate\Support\Traits\Macroable.

Features

Delivered Haru0\EloquentSqlDumper\ServiceProvider registers a dump macro on Illuminate\Database\Query\Builder which then could be then used for logging and debugging.

Although, you will be fine, I strongly discourage you from using this library on production for logging purposes. I believe it's not the proper way for this, and you should seek for dedicated logging solution.

Installation

This package supports package-discovery and can be used straight away after adding to the Composer's dependencies.

If your project disables package-discovery feature, it is necessary to manually register Haru0\EloquentSqlDumper\ServiceProvider. This can be done by adding this line below, inside config/app.php file.

No configuration options available.

Usage

Haru0\EloquentSqlDumper\Services\DumperService, once registered, can be basically used anywhere. It is also easily overrideable and extensible.

Example routes/web.php file:

Tinker version, for REPL lovers:

Overriding and extending

If you need to adjust or override Haru0\EloquentSqlDumper\Services\DumperService functionality, you're welcome to either bind implementation to the contract, or register listener to the two events dispatched by the service.

Depending on your needs, one of the ways of customizing dump macro, is to write your own DumperService and bind it to the Haru0\EloquentSqlDumper\Contracts\DumperContract.

Other way of customizing dump macro is to register a listener or subscriber to the Haru0\EloquentSqlDumper\Events\AfterDumpEvent and Haru0\EloquentSqlDumper\Events\BeforeDumpEvent events.

Finally, you can modify macro name (in case it collides with existing one). To do so, adjust configuration option or put ELOQUENT_SQL_DUMPER_MACRO environment variable into your .env file.

You can change that environment by overriding configuration file. Do do so, you need to publish package configuration file php artisan vendor:publish --provider=Haru0\EloquentSqlDumper\ServiceProvider.

Then, use it the same way dump was shown in the Usage chapter.

Macro name is always casted to Camel case. In this example above, your macro will be executed by $query->fooBarBaz.

Contribute

Any contribution is welcome. Fork this repository and create a pull request. Please remember to provide brief description.

Here you can find all contributors.

License

MIT


All versions of eloquent-sql-dumper with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package haru0/eloquent-sql-dumper contains the following files

Loading the files please wait ....