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
composer install syberisle/laravel-castable-archive
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'
Please see CHANGELOG for more information about recent changes.
Please see CONTRIBUTING for details.
If you've found a bug regarding security please report it via the security tab of this repository.
The MIT License (MIT). Please see License File for more information.