Download the PHP package syrian-open-source/laravel-relational-metrics without Composer
On this page you can find all versions of the php package syrian-open-source/laravel-relational-metrics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download syrian-open-source/laravel-relational-metrics
More information about syrian-open-source/laravel-relational-metrics
Files in syrian-open-source/laravel-relational-metrics
Package laravel-relational-metrics
Short Description This package will help you to get your model metrics, and their related models' metrics which will help you to avoid writing to many requests or queries.
License MIT
Informations about the package laravel-relational-metrics
Relational Metrics
This package will help you to make your metrics easier, You could get metrics about your Models, Models depending on their relations, or even metrics about your models depending on multiple conditions!!
It would be a very easy to get the number of your stores which has products has a price more than x$ ;)
1 - Dependency
The first step is using composer to install the package and automatically update your composer.json file, you can do this by running:
Usage
The Basic Usage of this package is the same of getting count of some model instances, but with a styled response
What you can do next, you could get the metrics of a model depending on one of its relations!
Let's assume we want to get the number of stores that has products with price more than 500
At the previous Example the Package will return the number of the stores which has products with price equals to 500
And last but not least, You could get the metrics about a model depending on any number of conditions you want!
At the previous Example the Package will return the number of the stores where their address contains "UAE" and their rate is more than 3
Changelog
Please see the CHANGELOG for more information about what has changed or updated or added recently.
Security
If you discover any security related issues, please email them first to [email protected], if we do not fix it within a short period of time please open a new issue describing your problem.
Credits
Package Logo by
About Syrian Open Source
The Syrian Open Source platform is the first platform on GitHub dedicated to bringing Syrian developers from different cultures and experiences together, to work on projects in different languages, tasks, and versions, and works to attract Syrian developers to contribute more under one platform to open source software, work on it, and issue it with high quality and advanced engineering features, which It stimulates the dissemination of the open-source concept in the Syrian software community, and also contributes to raising the efficiency of developers by working on distributed systems and teams.