mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 14:51:07 +03:30
feat: add factory for models
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Gallery>
|
||||
*/
|
||||
class GalleryFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => \App\Models\User::factory(),
|
||||
'path' => $this->faker->imageUrl(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user