25 lines
621 B
PHP
25 lines
621 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Lib\Helpers\FileStorageHelper;
|
|
use App\Models\Testimonial;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class TestimonialSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
FileStorageHelper::removeModelFiles(new Testimonial());
|
|
Testimonial::factory(12)->create([
|
|
'picture' => FileStorageHelper::storeFile(new Testimonial(), new \SplFileInfo(
|
|
\resource_path('../database/factories/assets/testimonials/default-picture-292x417.png')
|
|
)),
|
|
]);
|
|
}
|
|
}
|