anourvalar / eloquent-serialize
Laravel Query Builder (Eloquent) serialization
Installs: 4 629 621
Dependents: 12
Suggesters: 0
Security: 0
Stars: 91
Watchers: 3
Forks: 8
Open Issues: 1
Requires
- php: ^7.4|^8.0
- laravel/framework: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.26
- laravel/legacy-factories: ^1.1
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.5|^10.5
- psalm/plugin-laravel: ^2.8
- squizlabs/php_codesniffer: ^3.7
README
Supports: Laravel 6 - Laravel 11
Installation
composer require anourvalar/eloquent-serialize
Usage
Serialize
$package = \EloquentSerialize::serialize( \App\User::query() ->with('userPhones') ->where('id', '>', '10') ->limit(20) );
Unserialize
$builder = \EloquentSerialize::unserialize($package); foreach ($builder->get() as $item) { // ... }