*/ class MessageFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition() { return [ 'title' => $this->faker->word(), 'content' => $this->faker->paragraph(), 'author_id' => $this->faker->randomElement(User::pluck('id')), 'preview'=> $this->faker->word(), 'tag' => $this->faker->word(), 'thumbnail' => $this->faker->imageUrl(800, 550, 'fake', true), ]; } }