- users active is recorded when users logges in - add active broker and active customer multi axis line chart - add filter option of 30 days and 7 days
15 lines
334 B
PHP
15 lines
334 B
PHP
<?php
|
|
|
|
namespace App\Actions;
|
|
|
|
use App\Models\PageVisit;
|
|
use App\Models\User;
|
|
|
|
final readonly class RecordUserPageVisitAction
|
|
{
|
|
public function execute(?User $user, string $page): void
|
|
{
|
|
PageVisit::create(['user_id' => $user?->id, 'page' => $page, 'user_type' => $user?->role ?? null, 'created_at' => now()]);
|
|
}
|
|
}
|