PHP code example of alareqi / laravel-blurhashable

1. Go to this page and download the library: Download alareqi/laravel-blurhashable library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alareqi / laravel-blurhashable example snippets


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