/ database / factories / ExpertTipFactory.php
ExpertTipFactory.php
 1  <?php
 2  
 3  namespace Database\Factories;
 4  
 5  use Illuminate\Database\Eloquent\Factories\Factory;
 6  
 7  /**
 8   * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\ExpertTip>
 9   */
10  class ExpertTipFactory extends Factory
11  {
12      /**
13       * Define the model's default state.
14       *
15       * @return array<string, mixed>
16       */
17      public function definition()
18      {
19          $type = $this->faker->randomElement(['App\RequirementTemplate']);
20          return [
21              'description' => $this->faker->paragraph(),
22              'tipable_type' => $type,
23              'tipable_id' => 1,
24          ];
25      }
26  }