EscolaLMS/Images

View on GitHub
database/factories/ImageCacheFactory.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace EscolaLms\Images\Database\Factories;

use EscolaLms\Images\Models\ImageCache;
use Illuminate\Database\Eloquent\Factories\Factory;

class ImageCacheFactory extends Factory
{
    protected $model = ImageCache::class;

    public function definition(): array
    {
        $path = $this->faker->filePath();

        return [
            'path' => $path,
            'hash_path' => sha1($path),
        ];
    }
}