master

laravel/framework

Last updated at: 29/12/2023 09:20

CurrentDeviceLogout.php

TLDR

The CurrentDeviceLogout class is an event class in the Illuminate\Auth\Events namespace that is used to represent the event of a user logging out from the current device.

Classes

CurrentDeviceLogout

The CurrentDeviceLogout class is an event class that represents the event of a user logging out from the current device. It uses the SerializesModels trait and has the following properties:

  • guard: The authentication guard name.
  • user: The authenticated user.

It has a constructor that accepts the guard name and the authenticated user as parameters.

<?php

namespace Illuminate\Auth\Events;

use Illuminate\Queue\SerializesModels;

class CurrentDeviceLogout
{
    use SerializesModels;

    /**
     * The authentication guard name.
     *
     * @var string
     */
    public $guard;

    /**
     * The authenticated user.
     *
     * @var \Illuminate\Contracts\Auth\Authenticatable
     */
    public $user;

    /**
     * Create a new event instance.
     *
     * @param  string  $guard
     * @param  \Illuminate\Contracts\Auth\Authenticatable  $user
     * @return void
     */
    public function __construct($guard, $user)
    {
        $this->user = $user;
        $this->guard = $guard;
    }
}