'boolean', 'login_successful' => 'boolean', 'login_at' => 'datetime', 'logout_at' => 'datetime', ]; /** * MorphTo relation to get the associated authenticatable user * * @return MorphTo<\Illuminate\Database\Eloquent\Model, AuthLog> */ public function authenticatable() { return $this->morphTo(); } /** * Compare 2 Authentications */ public function equals(self $other) : bool { return $this->ip_address === $other->ip_address && $this->user_agent === $other->user_agent && $this->login_at == $other->login_at && $this->login_successful == $other->login_successful && $this->logout_at == $other->logout_at && $this->cleared_by_user == $other->cleared_by_user && $this->guard == $other->guard && $this->login_method == $other->login_method; } }