Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpyw/compoships-eager-limit
topclaudy/compoships + staudenmeir/eloquent-eager-limit
https://github.com/mpyw/compoships-eager-limit
composite-keys eagerload eloquent laravel php
Last synced: 3 months ago
JSON representation
topclaudy/compoships + staudenmeir/eloquent-eager-limit
- Host: GitHub
- URL: https://github.com/mpyw/compoships-eager-limit
- Owner: mpyw
- License: mit
- Created: 2019-11-12T12:26:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-15T05:20:52.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T13:07:48.194Z (3 months ago)
- Topics: composite-keys, eagerload, eloquent, laravel, php
- Language: PHP
- Homepage:
- Size: 30.3 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Compoships Eager Limit [![Build Status](https://github.com/mpyw/compoships-eager-limit/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/mpyw/compoships-eager-limit/actions) [![Coverage Status](https://coveralls.io/repos/github/mpyw/compoships-eager-limit/badge.svg?branch=master)](https://coveralls.io/github/mpyw/compoships-eager-limit?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mpyw/compoships-eager-limit/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mpyw/compoships-eager-limit/?branch=master)
[topclaudy/compoships](https://github.com/topclaudy/compoships) + [staudenmeir/eloquent-eager-limit](https://github.com/staudenmeir/eloquent-eager-limit)
## Requirements
- PHP: `^8.0`
- Laravel: `^9.0 || ^10.0`
- [Compoships](https://github.com/topclaudy/compoships): `^2.0.4`
- [Eloquent Eager Limit](https://github.com/staudenmeir/eloquent-eager-limit): `^1.7.1`## Installing
```
composer require mpyw/compoships-eager-limit
```## Usage
```php
hasMany(Comment::class);
}public function authorComments()
{
return $this->hasMany(Comment::class, ['post_id', 'user_id'], ['id', 'user_id']);
}
}
``````php
function ($query) {
$query->limit(3)->offset(1);
}])->get();
```For more details, visit each base package repository.
- [topclaudy/compoships](https://github.com/topclaudy/compoships)
- [staudenmeir/eloquent-eager-limit](https://github.com/staudenmeir/eloquent-eager-limit)## Special Thanks
- **[@topclaudy](https://github.com/topclaudy)**
- **[@staudenmeir](https://github.com/staudenmeir)**