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
37
database/Factories/DatabaseFactory.php
Normal file
37
database/Factories/DatabaseFactory.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Str;
|
||||
use Pterodactyl\Models\Database;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class DatabaseFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = Database::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
static $password;
|
||||
|
||||
return [
|
||||
'database' => Str::random(10),
|
||||
'username' => Str::random(10),
|
||||
'remote' => '%',
|
||||
'password' => $password ?: encrypt('test123'),
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
}
|
||||
}
|
Reference in a new issue