mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
update all model factories
This commit is contained in:
32
database/factories/DatabaseHostFactory.php
Normal file
32
database/factories/DatabaseHostFactory.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class DatabaseHostFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = DatabaseHost::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->colorName,
|
||||
'host' => $this->faker->unique()->ipv4,
|
||||
'port' => 3306,
|
||||
'username' => $this->faker->colorName,
|
||||
'password' => Crypt::encrypt($this->faker->word),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user