2023-06-12 13:12:46 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Factories\Maildispatcher\Models;
|
|
|
|
|
2023-07-17 11:50:26 +02:00
|
|
|
use App\Maildispatcher\Models\Maildispatcher;
|
|
|
|
use App\Member\FilterScope;
|
2023-06-12 13:12:46 +02:00
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2023-07-17 11:50:26 +02:00
|
|
|
use Illuminate\Support\Str;
|
2023-06-12 13:12:46 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Maildispatcher\Models\Maildispatcher>
|
|
|
|
*/
|
|
|
|
class MaildispatcherFactory extends Factory
|
|
|
|
{
|
2023-07-17 11:50:26 +02:00
|
|
|
public $model = Maildispatcher::class;
|
|
|
|
|
2023-06-12 13:12:46 +02:00
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
|
|
|
* @return array<string, mixed>
|
|
|
|
*/
|
|
|
|
public function definition()
|
|
|
|
{
|
|
|
|
return [
|
2023-07-17 11:50:26 +02:00
|
|
|
'name' => Str::slug($this->faker->words(3, true)),
|
2023-06-12 13:12:46 +02:00
|
|
|
];
|
|
|
|
}
|
2023-07-17 11:50:26 +02:00
|
|
|
|
|
|
|
public function filter(FilterScope $filter): self
|
|
|
|
{
|
|
|
|
return $this->state([
|
|
|
|
'filter' => $filter->toArray(),
|
|
|
|
]);
|
|
|
|
}
|
2023-06-12 13:12:46 +02:00
|
|
|
}
|