<?php

declare(strict_types=1);

namespace App\Listeners;

use App\Events\UserLoggedIn;
use Illuminate\Auth\Events\Login;

/**
 * Class LaravelLoginEventListener
 *
 * @package App\Listeners
 */
final class LaravelLoginEventListener
{
    /**
     * @param \Illuminate\Auth\Events\Login $event
     *
     * @return void
     */
    public function handle(Login $event)
    {
        event(new UserLoggedIn($event->user, now()));
    }
}
