laravel-castable-archive maintained by syberisle
Description
Tool for casting a model field as bzip or gzip
Author
Last update
2024/03/18 04:47
(dev-master)
License
Downloads
6
Tags
Laravel Model attribute to de/compress the value
This package allows you to cast a model attribute as a compressed value using either gzip or bzip.
Available Casts:
SyberIsle\Laravel\Cast\Archive\BzArchiveSyberIsle\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.