first commit

This commit is contained in:
gabriellina640
2026-04-13 21:39:44 -05:00
commit f551520161
95 changed files with 14931 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Game>
*/
class GameFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->words(3, true),
'platform' => fake()->randomElement(['Steam', 'PlayStation', 'Xbox', 'Nintendo Switch']),
'active_players' => fake()->numberBetween(1000, 2000000),
'weekly_points' => fake()->numberBetween(10, 1000),
'monthly_points' => fake()->numberBetween(100, 10000),
'yearly_points' => fake()->numberBetween(1000, 100000),
];
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}