*/ class MediaFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Media::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'path' => 'media/'.$this->faker->uuid.'.jpg', 'type' => 'image', 'created_at' => Carbon::now()->toDateTimeString(), 'updated_at' => Carbon::now()->toDateTimeString(), ]; } }