alareqi/laravel-blurhashable

这是我开发的laravel-blurhashable包

v1.0.0 2024-07-30 17:10 UTC

This package is auto-updated.

Last update: 2024-09-30 19:49:06 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

自动处理图像模糊哈希,配置简单

安装

您可以通过composer安装此包

composer require alareqi/laravel-blurhashable

只需将$blurhashable数组添加到模型中

use Alareqi\LaravelBlurhashable\Traits\HasBlurhash;

class Project extends Model
{
    use HasBlurhash;
    protected $fillable = [
        'id',
        'name',
        'description',
        'image',
        'image_blurhash',
        'mobile_image',
        'mobile_image_blurhash',
        'type',
        'url',
        'status'
    ];

    protected $blurhashable = [
        'image' => 'image_blurhash',
        'mobile_image' => 'mobile_image_blurhash'
    ];

变更日志

有关最近更改的更多信息,请参阅变更日志

贡献

有关详细信息,请参阅贡献指南

安全漏洞

有关报告安全漏洞的详细信息,请参阅我们的安全策略

鸣谢

许可证

MIT许可证(MIT)。有关更多信息,请参阅许可证文件