first commit from hostslim
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Visitor;
|
||||
use App\Models\Website;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/** @extends Factory<Visitor> */
|
||||
class VisitorFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'website_id' => Website::factory(),
|
||||
'uid' => Str::random(32),
|
||||
'first_seen_at' => now(),
|
||||
'last_seen_at' => now(),
|
||||
'device_type' => fake()->randomElement(['desktop', 'mobile', 'tablet']),
|
||||
'browser' => fake()->randomElement(['Chrome', 'Firefox', 'Safari', 'Edge']),
|
||||
'browser_version' => fake()->numerify('##.#'),
|
||||
'os' => fake()->randomElement(['Windows', 'macOS', 'Linux', 'iOS', 'Android']),
|
||||
'os_version' => fake()->numerify('##.#'),
|
||||
'screen_resolution' => fake()->randomElement(['1920x1080', '1366x768', '390x844']),
|
||||
'language' => fake()->randomElement(['en', 'de', 'fr', 'es']),
|
||||
'country' => fake()->countryCode(),
|
||||
'region' => fake()->state(),
|
||||
'city' => fake()->city(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user