Init(Core): add project to git and add seeders and factory
This commit is contained in:
22
database/factories/ImageFactory.php
Normal file
22
database/factories/ImageFactory.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Image;
|
||||
use App\Models\Page;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ImageFactory extends Factory
|
||||
{
|
||||
protected $model = Image::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'path' => fake()->imageUrl(640, 480),
|
||||
'user_id' => fake()->numberBetween(1, 10),
|
||||
'page_id' => Page::factory(),
|
||||
'user_token' => fake()->uuid(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user