PHP code example of selim-salihovic / verifi
1. Go to this page and download the library: Download selim-salihovic/verifi 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/ */
selim-salihovic / verifi example snippets
'providers' => [
...
Meness\Verifi\Providers\VerifiServiceProvider::class,
];
'aliases' => [
...
'Verifi' => Meness\Verifi\Facades\Verifi::class,
];
class User extends Authenticatable implements Verifi
{
use Notifiable, VerifiTrait;
}
Route::get('/verify', 'Auth\RegisterController@verify');
Route::get('/resend', 'Auth\RegisterController@resend');
Verifi::verify(request(), function ($user) {
if (is_null($user)) {
// Invalid credentials provided
} else {
// Verified
}
});
Verifi::resend($user, function ($user) {
// Resent successfully
});
$routeMiddleware = [
...
'isEmailVerified' => \Meness\Verifi\Http\Middleware\IsEmailVerified::class,
];
php artisan vendor:publish --provider="Meness\Verifi\Providers\VerifiServiceProvider" --tag="migrations"
php artisan migrate
php artisan vendor:publish --provider="Meness\Verifi\Providers\VerifiServiceProvider" --tag="config"