Skip to content

SyberIsle/laravel-castable-archive

Repository files navigation

Laravel Model attribute to de/compress the value

Latest Version on Packagist GitHub Workflow Status Total Downloads

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.

About

Tool for compressing a model field as bzip or gzip

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages