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
48
database/Factories/ServerFactory.php
Normal file
48
database/Factories/ServerFactory.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Illuminate\Support\Str;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
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 [
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
'uuidShort' => Str::lower(Str::random(8)),
|
||||
'name' => $this->faker->firstName,
|
||||
'description' => implode(' ', $this->faker->sentences()),
|
||||
'skip_scripts' => 0,
|
||||
'suspended' => 0,
|
||||
'memory' => 512,
|
||||
'swap' => 0,
|
||||
'disk' => 512,
|
||||
'io' => 500,
|
||||
'cpu' => 0,
|
||||
'threads' => null,
|
||||
'oom_disabled' => 0,
|
||||
'installed' => 1,
|
||||
'allocation_limit' => null,
|
||||
'database_limit' => null,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
}
|
||||
}
|
Reference in a new issue