<?php
namespace App\Services;

use App\Models\UserLog;

class ActivityLogService
{
    public static function log($activity, $type = null, $referenceId = null)
    {
        UserLog::create([
            'user_id' => auth()->id(),
            'activity' => $activity,
            'activity_type' => $type,
            'reference_id' => $referenceId,
            'ip_address' => request()->ip(),
        ]);
    }
}