syberisle / laravel-castable-archive
Tool for casting a model field as bzip or gzip
0.0.1
2024-03-18 03:44 UTC
Requires
- php: ^8.0
- ext-bz2: *
- ext-zlib: *
- illuminate/contracts: ^9.28 || ^10.0 || ^11.0
Requires (Dev)
- nunomaduro/collision: ^6.2
- orchestra/testbench: ^7.7 || ^8.0
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.5.24
- squizlabs/php_codesniffer: ^3.9
- syberisle/coding-standards: ^2.0
This package is auto-updated.
Last update: 2024-12-18 05:27:29 UTC
README
This package allows you to cast a model attribute as a compressed value using either gzip or bzip.
Available Casts:
SyberIsle\Laravel\Cast\Archive\BzArchive
SyberIsle\Laravel\Cast\Archive\GzArchive
Installation
composer install syberisle/laravel-castable-archive
Usage
use SyberIsle\Laravel\Cast\Archive; class MyModel { protected $casts = [ 'field_name' => Archive\GzArchive::class ]; } $model->field_name = 'kakaw' // raw attribute = b"ËNÌN,\x07\x00" $value = $model->field_name; // = 'kakaw'
Changelog
Please see CHANGELOG for more information about recent changes.
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please report it via the security tab of this repository.
License
The MIT License (MIT). Please see License File for more information.