The missing laravel helper that allows you to inspect your eloquent queries with it's bind parameters

Overview

Laravel Query Inspector

The missing laravel helper that allows you to ispect your eloquent queries with it's bind parameters

Motivations

Let's say you want to get the generated sql query from an eloquent query, by default in Laravel you can use the toSql() method, but in some situations you may need to get the generated query with its values instead of just getting the prepared statement, in this case you can use this package as well as a helper that which will give you the generated sql query with its bind parameters as a plain sql query just by calling toRawSql() from any eloquent query.

Installation

You can install the package via composer:

composer require mouadziani/laravel-query-inspector

Usage

// Uisng toSql()
$query = Model::where('attribute', 'value')->toSql();
dd($query); // select * from models where attribute = ?

// Uisng toRawSql()
$query = Model::where('attribute', 'value')->toRawSql();
dd($query); // select * from models where attribute = 'value'

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

You might also like...
The Missing Laravel Commands

Made with ❤️ by SecTheater Foundation Artify CheatSheet will be availble soon Laravel is a great framework and it provides us the ability to create ou

Voyager - The Missing Laravel Admin
Voyager - The Missing Laravel Admin

Voyager - The Missing Laravel Admin Made with ❤️ by The Control Group Website & Documentation: https://voyager.devdojo.com/ Video Tutorial Here: https

Missing pet flyer - Laravel 4 application

Laravel 4.0 Application - Pet Flyer generator Features This is the source of http://missingpetflyer.com that is deployed to Pagodabox. This applicatio

This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.

Laravel Verify New Email Laravel supports verifying email addresses out of the box. This package adds support for verifying new email addresses. When

Provides the missing range field for the Filament forms.
Provides the missing range field for the Filament forms.

The missing range field for the Filament forms. Installation You can install the package via composer: composer require yepsua/filament-range-field Pu

Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes and constraints by adding them as a subquery.

Laravel Eloquent Scope as Select Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes an

Simple Laravel 5 package to dump all running queries on the page.
Simple Laravel 5 package to dump all running queries on the page.

Abandoned: Use this package instead Laravel QueryDumper Introduction Simple Laravel 5 package to dump all running queries on the page. If it's SELECT

Fullstack komponents to write Forms, Queries and Menus in Laravel

kompo.io • Documentation • Demos • Twitter kompo/kompo kompo/kompo is a library of Fullstack Komponents to help you write forms, queries and menus in

Trait for Laravel testing to count/assert about database queries

counts_database_queries Trait for Laravel testing to count/assert about database queries Installing composer require ohffs/counts-database-queries-tra

Releases(1.0.1)
Owner
Mouad ZIANI
Software Engineer. Experienced in TALL & VILT Stacks
Mouad ZIANI
Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries

Laravel Query Helper Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries, this package will contain all advanced SQL

Syrian Open Source 15 Nov 20, 2022
Filter resources with request parameters

FilterWhere Filter resources with request parameters Author: Thomas Jakobi [email protected] License: GNU GPLv2 Features With this MODX Revolu

Thomas Jakobi 1 Jul 12, 2022
🧑‍🔬 The missing assertions for your views in your Laravel applications.

Laravel View Assertions The missing assertions for your views in your Laravel applications. Installation You'll have to follow a couple of simple step

Sven Luijten 4 Dec 21, 2022
A helper package to flash a bootstrap alert to the browser via a Facade or a helper function.

Alert Box (Laravel) A helper package to flash a bootstrap alert to the browser via a Facade or a helper function. <div class="alert alert-info fade in

Ben-Piet O'Callaghan 17 Dec 30, 2022
Cache-purge-helper - Additional instances where nginx-helper and lscache plugin should be purged.

cache-purge-helper Additional instances where nginx-helper and lscache plugin should be purged. Install Extract the zip file. Upload them to /wp-conte

Jordan 10 Oct 5, 2022
Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).

Laravel-Algereography Laravel-Algereography allows you to add Migrations, Seeders and Models of Algerian Wilayas and Dairas to your existing or new co

Hocine Saad 48 Nov 25, 2022
Collection of the Laravel/Eloquent Model classes that allows you to get data directly from a Magento 2 database.

Laragento LAravel MAgento Micro services Magento 2 has legacy code based on abandoned Zend Framework 1 with really ugly ORM on top of outdated Zend_DB

Egor Shitikov 87 Nov 26, 2022
a Laravel package help you to execute more effective databases queries.

Laravel Query Helper Laravel Query Helper was developed for laravel 7.2+ to help you optimizing sql queries, this package will contain all advanced sq

karam mustafa 9 Jul 26, 2022
This is a Laravel package for msegat. Its goal is to remove the complexity

laravel-msegat package This is a Laravel package for msegat. Its goal is to remove the complexity Laravel Msegat Package This is a package for msegat.

Moemen Gaballah 8 Dec 13, 2022
Need some filters? This package is based on the Repository Design Pattern to let you create specific queries easily.

DevMakerLab/Laravel-Filters Need some filters? This package is based on the Repository Design Pattern to let you create specific queries easily. Insta

DevMakerLab 19 Feb 20, 2022