Trait 'Illuminate\Foundation\Events\Dispatchable' not found

1.3k Views Asked by At

I'm using pragmarx/google2fa Laravel package for implementing Google Two-Factor Authentication on my Laravel app. It is working fine but I am getting this error after keying the OTP password - correenter image description here

<?php

namespace PragmaRX\Google2FALaravel\Events;

use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class LoginSucceeded
{
use Dispatchable, InteractsWithSockets, SerializesModels;

public $user;

/**
 * Create a new event instance.
 *
 * @param $user
 */
public function __construct($user)
{
    $this->user = $user;
}

}

Is there a way an alternate way for this for Laravel 5.3.xx version?

1

There are 1 best solutions below

0
On

Illuminate\Foundation\Events\Dispatchable was included on Laravel 5.4.

In fact I see in the Readme that pragmarx/google2fa requires Laravel 5.4+ to run.

Sorry!