PHP code example of stylers / laravel-email-verification
1. Go to this page and download the library: Download stylers/laravel-email-verification library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stylers / laravel-email-verification example snippets
use Stylers\EmailVerification\NotifiableInterface;
use Illuminate\Notifications\Notifiable;
use Stylers\EmailVerification\EmailVerifiableInterface;
use Stylers\EmailVerification\Frameworks\Laravel\Models\Traits\EmailVerifiable;
class User extends Model implements NotifiableInterface, EmailVerifiableInterface
{
use Notifiable;
use EmailVerifiable;
...
public function getName(): string
{
return (string)$this->name;
}
}
// app/Providers/EventServiceProvider.php
protected $listen = [
...
'Stylers\EmailVerification\Frameworks\Laravel\Events\VerificationSuccess' => [
'your\listener\class1',
'your\listener\class2',
]
];
// OR you can register your listener via Event facade in any ServiceProvider::boot method
Event::listen(
'Stylers\EmailVerification\Frameworks\Laravel\Events\VerificationSuccess',
'your\listener\class'
);