I want to check if email verification in laravel was enabled. The feature can be enabled by implementing the MustVerifyEmail interface on the user model.
But what is a proper laravel way to check if this feature was enabled?
Background: I want to create a command line user creation command that also sends an email verification link, but only if that feature is enabled.
>Solution :
create a method
public function isMustVerifyEmail():bool
{
return ($this instanceof MustVerifyEmail);
}
you can use like bellow
$check=$user->isMustVerifyEmail();
dd($check);