Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
028921b42a
commit
a043071e3c
211 changed files with 4394 additions and 2933 deletions
33
database/Factories/DatabaseHostFactory.php
Normal file
33
database/Factories/DatabaseHostFactory.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
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 a new issue