ServerFactory.php 613 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Database\Factories;
  3. use App\Models\Product;
  4. use Illuminate\Database\Eloquent\Factories\Factory;
  5. use Illuminate\Support\Str;
  6. class ServerFactory extends Factory
  7. {
  8. /**
  9. * Define the model's default state.
  10. *
  11. * @return array
  12. */
  13. public function definition()
  14. {
  15. return [
  16. 'name' => $this->faker->name(),
  17. 'description' => $this->faker->text(60),
  18. 'identifier' => Str::random(30),
  19. 'pterodactyl_id' => $this->faker->numberBetween(1000000, 1000000000),
  20. 'product_id' => Product::factory(),
  21. ];
  22. }
  23. }