phase 10
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\AnalyticsSession;
|
||||
use App\Models\PageView;
|
||||
use App\Models\Visitor;
|
||||
use App\Models\Website;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<PageView> */
|
||||
class PageViewFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'website_id' => Website::factory(),
|
||||
'visitor_id' => Visitor::factory(),
|
||||
'analytics_session_id' => AnalyticsSession::factory(),
|
||||
'url' => fake()->url(),
|
||||
'path' => '/'.fake()->slug(2),
|
||||
'title' => fake()->sentence(3),
|
||||
'referrer' => null,
|
||||
'time_on_page' => fake()->numberBetween(5, 300),
|
||||
'viewed_at' => now(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user