Download the PHP package tjbp/laravel-verify-emails without Composer
On this page you can find all versions of the php package tjbp/laravel-verify-emails. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tjbp/laravel-verify-emails
More information about tjbp/laravel-verify-emails
Files in tjbp/laravel-verify-emails
Package laravel-verify-emails
Short Description Verify email addresses in Laravel <5.7 using the same pattern as password resets.
License MIT
Informations about the package laravel-verify-emails
Laravel Verify Emails
This package allows you to verify account emails in Laravel using the same pattern as password resets.
DEPRECATED: Email verification was implemented in the Laravel Framework for the release of 5.7 - if you're using 5.7 or above this package is unnecessary and if you're using a release below 5.6 it's no longer officially supported and you shouldn't be. This package will no longer be maintained.
Installation
This package is installable with Composer via Packagist.
Configuration
Add the following to config/auth.php
:
Change the passwords.users.table
setting to email_tokens
too, allowing password reset and email verification tokens to use the same table. Alternatively, create a new table for the email verification tokens using the same definitions as your password resets table and configure the above accordingly.
Usage
Implement the LaravelVerifyEmails\Contracts\Auth\CanVerifyEmail
contract in your App\User
model and use the LaravelVerifyEmails\Auth\VerifyEmails\CanVerifyEmail
trait to include the necessary methods. By default, a boolean column on your users table named verified
is expected. This behaviour can be altered by overriding the methods in the trait.
Add the LaravelVerifyEmails\Auth\VerifyEmails\VerifyEmailServiceProvider::class
service provider to the providers
array in config/app.php
.
Run php artisan make:verify-emails
to generate views, routes and a controller. Alternatively, use the LaravelVerifyEmails\Foundation\Auth\VerifiesEmails
trait in a controller of your choice.
Finally, call $user->unverify()
to mark the user as unverified and send a verification token to their email address. To catch unverified users, replace the auth
route middleware in App\Http\Kernel
with \LaravelVerifyEmails\Auth\Middleware\AuthenticateAndVerifyEmail::class
. If you'd rather use your own middleware, or want to check if a user is verified elsewhere, call $user->isVerified()
.
Licence
Laravel Verify Email is open-sourced software licensed under the MIT license.
All versions of laravel-verify-emails with dependencies
illuminate/database Version ^5.0
illuminate/mail Version ^5.0
illuminate/support Version ^5.0