Download the PHP package lastdragon-ru/lara-asp-eloquent without Composer
On this page you can find all versions of the php package lastdragon-ru/lara-asp-eloquent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lastdragon-ru/lara-asp-eloquent
More information about lastdragon-ru/lara-asp-eloquent
Files in lastdragon-ru/lara-asp-eloquent
Package lara-asp-eloquent
Short Description The Awesome Set of Packages for Laravel - Eloquent Helpers.
License MIT
Homepage https://github.com/LastDragon-ru/lara-asp
Informations about the package lara-asp-eloquent
(Laravel) Eloquent Helpers
This package contains useful extensions and mixins for Eloquent.
[include:artisan]: <lara-asp-documentator:requirements "{$directory}">
Requirements
Requirement | Constraint | Supported by |
---|---|---|
PHP | ^8.3 |
HEAD ⋯ 5.0.0 |
^8.2 |
HEAD ⋯ 2.0.0 |
|
^8.1 |
6.4.2 ⋯ 2.0.0 |
|
^8.0 |
4.6.0 ⋯ 2.0.0 |
|
^8.0.0 |
1.1.2 ⋯ 0.12.0 |
|
>=8.0.0 |
0.11.0 ⋯ 0.4.0 |
|
>=7.4.0 |
0.3.0 ⋯ 0.1.0 |
|
Laravel | ^11.0.0 |
HEAD ⋯ 6.2.0 |
^10.34.0 |
HEAD ⋯ 6.2.0 |
|
^10.0.0 |
6.1.0 ⋯ 2.1.0 |
|
^9.21.0 |
5.6.0 ⋯ 5.0.0-beta.1 |
|
^9.0.0 |
5.0.0-beta.0 ⋯ 0.12.0 |
|
^8.22.1 |
3.0.0 ⋯ 0.2.0 |
|
^8.0 |
0.1.0 |
Installation
Iterators
Iterators are similar to Builder::chunk()
but uses generators instead of \Closure
that makes code more readable:
Iterators also support limit/offset, by default it will try to get them from the Builder, but you can also set them by hand:
When you use the default https://github.com/laravel/framework/issues/35400 for more details). But there are few limitations:
- it is not possible to sort rows, they always will be sorted by
column asc
; - the
column
should not be changed while iteration or this may lead to repeating row in results; - the row inserted while iteration may be skipped if it has
column
with the value that lover than the internal pointer; - queries with UNION is not supported;
offset
from Builder will not be used;
To create a change safe instance you can use:
Mixins
\Illuminate\Database\Eloquent\Builder
Name | Description |
---|---|
orderByKey(string $direction = 'asc') |
Add an ORDER BY primary_key clause to the query. |
orderByKeyDesc() |
Alias of orderByKey('desc') |
getChunkedIterator() |
Return ChunkedIterator instance. |
getChangeSafeIteratorIterator() |
Return ChunkedChangeSafeIterator instance. |
Upgrading
Please follow Upgrade Guide.
Contributing
This package is the part of Awesome Set of Packages for Laravel. Please use the main repository to report issues, send pull requests, or ask questions.
All versions of lara-asp-eloquent with dependencies
illuminate/collections Version ^10.34.0|^11.0.0
illuminate/database Version ^10.34.0|^11.0.0
illuminate/support Version ^10.34.0|^11.0.0
lastdragon-ru/lara-asp-core Version self.version
symfony/polyfill-php83 Version ^1.28