faker->words(10); $words[rand(0, count($words)-1)] = '?'; return [ 'raid_id' => null, 'character_id' => null, 'body' => join(" ", $words) ]; } public function random_character() { return $this->state(function (array $attributes) { return [ 'raid_id' => Character::all()->random()->id, ]; }); } public function random_class() { return $this->state(function (array $attributes) { return [ 'class' => $this->faker->randomElement(['warrior', 'rogue', 'paladin', 'mage', 'warlock', 'shaman', 'druid', 'priest']), ]; }); } public function random_raid() { return $this->state(function (array $attributes) { return [ 'raid_id' => Raid::factory(), ]; }); } }