alareqi/laravel-blurhashable

This is my package laravel-blurhashable

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

This package is auto-updated.

Last update: 2024-10-30 20:00:22 UTC


README

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

Handle image blurhash automatically with minimum configurations

Installation

You can install the package via composer:

composer require alareqi/laravel-blurhashable

just add the $blurhashable array to model

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'
    ];

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.