Paillasse/portail/database/factories/LabFactory.php

22 lines
433 B
PHP
Raw Normal View History

<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class LabFactory extends Factory
{
public function definition(): array
{
$titre = fake()->unique()->sentence(3);
return [
'identifiant' => Str::slug($titre),
'titre' => $titre,
'niveau' => 'decouverte',
'duree_min' => 45,
];
}
}