engelsystem/db/factories/SessionFactory.php

25 lines
589 B
PHP
Raw Normal View History

2023-09-17 14:55:02 +02:00
<?php
declare(strict_types=1);
namespace Database\Factories\Engelsystem\Models;
use Engelsystem\Models\Session;
2023-09-17 15:03:56 +02:00
use Engelsystem\Models\User\User;
2023-09-17 14:55:02 +02:00
use Illuminate\Database\Eloquent\Factories\Factory;
class SessionFactory extends Factory
{
/** @var string */
protected $model = Session::class; // phpcs:ignore
public function definition(): array
{
return [
'id' => $this->faker->lexify('??????????'),
'payload' => $this->faker->text(100),
2023-09-17 15:03:56 +02:00
'user_id' => $this->faker->optional()->passthrough(User::factory()),
2023-09-17 14:55:02 +02:00
];
}
}