Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
615 B
PHP
Raw Permalink Normal View History

2020-11-03 17:18:31 +01:00
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
2024-08-02 22:23:31 -05:00
/** @extends Factory<\App\Models\AlertSchedule> */
2020-11-03 17:18:31 +01:00
class AlertScheduleFactory extends Factory
{
/**
* Define the model's default state.
*/
2023-05-24 22:21:54 +02:00
public function definition(): array
2020-11-03 17:18:31 +01:00
{
return [
'title' => $this->faker->name(),
'notes' => $this->faker->text(),
2020-11-03 17:18:31 +01:00
'recurring' => 0,
];
}
public function recurring()
{
return $this->state(function () {
return [
'recurring' => 1,
];
});
}
}