tadah-eleven/database/factories/ServerFactory.php

35 lines
743 B
PHP

<?php
namespace Database\Factories;
use App\Models\Server;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class ServerFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Server::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'name' => $this->faker->sentence($nbWords = 2, $variableNbWords = true),
'description' => $this->faker->text(),
'creator' => 1,
'ip' => '127.0.0.1',
'port' => '53640',
'secret' => Str::random(10)
];
}
}