<?php

namespace App\Listeners;

use App\Events\OperationLoggedEvent;
use App\Models\OperationLog;
use Illuminate\Contracts\Queue\ShouldQueue;

class OperationLogListener implements ShouldQueue
{
    public function handle(OperationLoggedEvent $event)
    {
        OperationLog::create([
            'admin_id' => $event->admin_id,
            'ip' => $event->ip,
            'input' => $event->input,
            'details' => $event->details,
        ]);
    }
}
