syberisle/laravel-castable-archive

Tool for casting a model field as bzip or gzip

0.0.1 2024-03-18 03:44 UTC

This package is auto-updated.

Last update: 2024-11-18 05:20:57 UTC


README

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.