Download the PHP package romdh4ne/laravel-querycraft without Composer

On this page you can find all versions of the php package romdh4ne/laravel-querycraft. 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 laravel-querycraft

A Laravel performance analysis dashboard for detecting N+1 queries, slow queries, missing indexes, and duplicate queries — in real time.

Laravel PHP License Packagist Downloads


✨ Features


📦 Installation

1. Require the package via Composer

2. Publish the config file

3. Publish the assets (logo, favicon)

4. Publish the views (optional — only if you want to customize the UI)

5. Clear caches

6. Visit the dashboard


🖥 Web Dashboard

Opening the dashboard

Or with a custom route prefix set in .env:

Analyzing an endpoint

  1. Enter your endpoint URL (e.g. /api/users)
  2. Select the HTTP method (GET, POST, PUT, PATCH, DELETE)
  3. Optionally add custom headers (e.g. Authorization: Bearer token)
  4. Optionally add a JSON request body for POST/PUT requests
  5. Click Analyze Request

QueryCraft fires an internal request to your endpoint, collects all queries, runs them through all detectors, and displays the results instantly.

Reading the results

Element Description
Score card 0–100 performance grade with letter (A–F) and emoji indicator
Query count Total number of queries executed by the endpoint
Total time Combined execution time of all queries in milliseconds
Issue cards Each problem with severity, stats, source location and fix suggestion
Source Location Exact file path and line number in your app (vendor files filtered out)
All Queries Collapsible list of every query fired with individual execution time

500 Error Inspector

When your endpoint crashes, QueryCraft catches it and displays:

Set APP_DEBUG=true in your .env for full exception details.

Client Error Display

When your endpoint returns a 4xx response (e.g. 422 validation error, 404), QueryCraft shows:

Config Panel

Click the ⚙️ icon in the top-right header to open the config panel:


⌨️ Artisan Command

Analyze endpoints directly from your terminal without opening a browser.

Signature

Examples

Sending a large body with --body-file

When your request has many fields, create a payload.json file instead of cramming everything inline:

Then run:

Use --body for small payloads. Use --body-file for large or complex payloads — it avoids shell escaping issues and is much easier to read and reuse.

Example output

If your endpoint requires authentication, pass --user=1 to run as a specific user. QueryCraft calls auth()->login($user) before firing the request.


⚙️ Configuration

After publishing, the config file is at config/querycraft.php. All values can be overridden via .env:

Full config reference

Tip: All settings can also be changed from the dashboard ⚙️ config panel — changes are saved directly to your .env.


🔬 How Detectors Work

🔁 N+1 Detection

Normalizes every query (replaces values with ?) and groups them by pattern. If the same pattern fires more than n1_count times, it's flagged. The exact file and line in your app that triggered the repeated query is shown.

Example:

Count Severity
5–10× low
10–20× medium
20–50× high
50×+ critical

🐢 Slow Query Detection

Flags any query exceeding slow_query_ms milliseconds (default: 100ms). Automatically suggests a fix based on the query structure.

Time Severity
> 200ms low
> 500ms medium
> 1000ms high
> 1000ms critical

Suggestions shown:


🗂 Missing Index Detection

Runs MySQL EXPLAIN on each query and flags full table scans, filesorts, and temporary table usage.

Triggers:

Example:

Rows examined Severity
> 1,000 low
> 10,000 medium
> 100,000 high
> 100,000 critical

📋 Duplicate Query Detection

Creates an md5 fingerprint of sql + bindings. If the exact same query with the same parameter values runs more than duplicate_count times (default: 2), it's flagged.

Example:


💯 Performance Score

Calculated as a weighted average across three dimensions:

Dimension Default Weight Description
Query Count 40% Fewer queries = higher score
Query Time 30% Faster total time = higher score
Issues Found 30% Fewer/lower severity issues = higher score
Score Grade Status
90–100 A 🟢 Excellent
80–89 B 🟡 Good
70–79 C 🟡 Acceptable
60–69 D 🟠 Below average
0–59 F 🔴 Critical issues

Weights are configurable from the dashboard config panel or via .env.


🔒 Security

QueryCraft is intended for local development only. Always disable it in production:


🔄 Updating


🗑 Uninstalling


🤝 Contributing

Setup

Local test app (separate project)

In a separate Laravel app, add to composer.json:

Then:

Visit http://localhost:8000/querycraft. Any change you make in the package reflects instantly thanks to the symlink.

📄 License

QueryCraft is open-source software licensed under the MIT license.


👨‍💻 Author

Made by Romdh4ne

If this package helps you, give it a ⭐ on GitHub!


All versions of laravel-querycraft with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
illuminate/database Version ^9.0|^10.0|^11.0|^12.0
illuminate/console Version ^9.0|^10.0|^11.0|^12.0
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 romdh4ne/laravel-querycraft contains the following files

Loading the files please wait ...