33 lines
762 B
PHP
33 lines
762 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\GitlabProject;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* Factory for generating GitlabProject model instances with randomized data.
|
|
*/
|
|
class GitlabProjectFactory extends Factory
|
|
{
|
|
/**
|
|
* Associated model.
|
|
*
|
|
* @var class-string<\App\Models\GitlabProject>
|
|
*/
|
|
protected $model = GitlabProject::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
"name" => fake()->unique()->words(3, true),
|
|
"url" => fake()->unique()->url(),
|
|
"gitlab_id" => fake()->unique()->numberBetween(1, 1000),
|
|
];
|
|
}
|
|
}
|