26 lines
477 B
PHP
26 lines
477 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Models\PageVisit;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
class RecordPageHit implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/**
|
|
* @param array<string, mixed> $attrs
|
|
*/
|
|
public function __construct(
|
|
public array $attrs,
|
|
public int $chain,
|
|
) {}
|
|
|
|
public function handle(): void
|
|
{
|
|
PageVisit::recordLanding($this->attrs, $this->chain);
|
|
}
|
|
}
|