Download the PHP package saasscaleup/laravel-n-plus-one-detector without Composer
On this page you can find all versions of the php package saasscaleup/laravel-n-plus-one-detector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saasscaleup/laravel-n-plus-one-detector
More information about saasscaleup/laravel-n-plus-one-detector
Files in saasscaleup/laravel-n-plus-one-detector
Package laravel-n-plus-one-detector
Short Description Real-time detection and resolution of N+1 query issues for Laravel applications. Support now Laravel 11
License MIT
Homepage https://github.com/saasscaleup/laravel-n-plus-one-detector
Informations about the package laravel-n-plus-one-detector
Real-time detection and resolution of N+1 query issues for Laravel applications. Provides detailed insights, advanced notifications, and a rich admin dashboard.
Perfect for solo developers and teams. Compatible with Laravel 5.5+ and PHP 7+.
Youtube
·
Twitter
·
Facebook
·
Buy Me a Coffee
Laravel N+1 Query Detector
Laravel N+1 Query Detector is a powerful package designed to help you identify and resolve N+1 query problems in real-time. Perfect for individual developers and teams, this package enhances your application’s performance by catching inefficient queries before they impact your users.
✨ Features
- Real-time N+1 Query Detection: Identify N+1 queries as they happen, ensuring your application remains performant.
- Detailed Query Insights: Get detailed information about each detected N+1 query, including file line, the class and methods involved.
- Advanced Notifications: Receive alerts via Slack, webhooks, or email, ensuring you never miss an important notification.
- Rich Admin Dashboards: View all N+1 warnings in a comprehensive and user-friendly dashboard.
- Suit for Teams and Solo Developers: Designed to be used by both solo developers and teams working collaboratively.
Requirements
- PHP >= 7
- Laravel >= 5.5
Installation
Install composer package (dev)
Via Composer - Not recommended for production environment
Publish package's config, migration and view files
Publish package's config, migration and view files by running below command:
Try this command first
If you are getting this result:
Than try to this:
and then enter the number of that represent the provider (in the example below the number is 14)
Run migration command
Run php artisan migrate
to create nplusone_warnings
table.
Run route:cache command
Run php artisan migrate
to make sure route cache will be purge becasue we are adding new route /n-plus-one-dashboard
.
Configuration
You can configure the package by editing the config/n-plus-one.php
file. This file allows you to set the threshold for detecting N+1 queries, notification preferences, and more.
Usage
Real-time Detection
The package automatically listens to your database queries and detects N+1 issues in real-time. When an N+1 query is detected, it logs the query details and optionally sends notifications.
Admin Dashboard
Access the rich admin dashboard to view all N+1 warnings:
The dashboard provides a comprehensive view of all detected N+1 queries, including SQL statements, occurrences, locations, and suggested fixes.
Notifications
Configure notifications to be sent via Slack, webhook, or email. Set your notification preferences in the config/n-plus-one.php
file to stay informed about N+1 issues in your application.
Slack notification
Webhook notification
Email notification
Advanced Features
Detailed Query Insights
The package provides detailed insights into each detected N+1 query, including the class and methods involved. This helps you quickly pinpoint the source of the problem and implement a fix.
License
Please see the MIT for more information.
Support 🙏😃
If you Like the tutorial and you want to support my channel so I will keep releasing amzing content that will turn you to a desirable Developer with Amazing Cloud skills... I will realy appricite if you:
Thanks for your support :)