2021-10-30 16:29:59 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories\Uploads;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
|
|
|
|
class ImageFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = \BookStack\Uploads\Image::class;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2023-01-21 15:50:04 -05:00
|
|
|
'name' => $this->faker->slug() . '.jpg',
|
|
|
|
'url' => $this->faker->url(),
|
|
|
|
'path' => $this->faker->url(),
|
2021-10-30 16:29:59 -04:00
|
|
|
'type' => 'gallery',
|
|
|
|
'uploaded_to' => 0,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|