├── .gitignore ├── src ├── views │ └── auth │ │ ├── emails │ │ └── verification.blade.php │ │ └── verification │ │ ├── message.blade.php │ │ └── resend.blade.php ├── Krucas │ └── LaravelUserEmailVerification │ │ ├── Contracts │ │ ├── Factory.php │ │ ├── RequiresEmailVerification.php │ │ ├── TokenRepositoryInterface.php │ │ └── VerificationBroker.php │ │ ├── AuthenticatesAndRegistersUsers.php │ │ ├── Facades │ │ └── Verification.php │ │ ├── Console │ │ ├── stubs │ │ │ ├── controllers │ │ │ │ └── verifycontroller.stub │ │ │ ├── routes.stub │ │ │ └── migrations │ │ │ │ ├── users_verifications.stub │ │ │ │ └── users.stub │ │ ├── ClearVerificationTokensCommand.php │ │ └── MakeVerificationCommand.php │ │ ├── RequiresEmailVerification.php │ │ ├── RedirectsUsers.php │ │ ├── AuthenticatesUsers.php │ │ ├── RegistersUsers.php │ │ ├── UserEmailVerificationServiceProvider.php │ │ ├── VerificationBroker.php │ │ ├── DatabaseTokenRepository.php │ │ ├── VerificationBrokerManager.php │ │ └── VerifiesUsers.php ├── translations │ └── en │ │ └── verification.php └── config │ └── verification.php ├── .travis.yml ├── phpunit.xml ├── LICENSE.md ├── composer.json ├── tests ├── RedirectsUsersTest.php ├── TestCase.php ├── AuthenticatesUsersTest.php ├── RegistersUsersTest.php ├── VerificationBrokerTest.php ├── DatabaseTokenRepositoryTest.php └── VerifiesUsersTest.php └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | vendor 3 | composer.lock -------------------------------------------------------------------------------- /src/views/auth/emails/verification.blade.php: -------------------------------------------------------------------------------- 1 | Click here to verify your account: {{ $link }} -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.5 5 | - 5.6 6 | - 7.0 7 | - hhvm 8 | 9 | before_script: 10 | - curl -s http://getcomposer.org/installer | php 11 | - php composer.phar install --dev 12 | 13 | script: phpunit -------------------------------------------------------------------------------- /src/Krucas/LaravelUserEmailVerification/Contracts/Factory.php: -------------------------------------------------------------------------------- 1 | middleware($this->guestMiddleware()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Krucas/LaravelUserEmailVerification/Console/stubs/routes.stub: -------------------------------------------------------------------------------- 1 | // verification token resend form 2 | Route::get('verify/resend', [ 3 | 'uses' => 'Auth\VerifyController@showResendForm', 4 | 'as' => 'verification.resend', 5 | ]); 6 | 7 | // verification token resend action 8 | Route::post('verify/resend', [ 9 | 'uses' => 'Auth\VerifyController@sendVerificationLinkEmail', 10 | 'as' => 'verification.resend.post', 11 | ]); 12 | 13 | // verification message / user verification 14 | Route::get('verify/{token?}', [ 15 | 'uses' => 'Auth\VerifyController@verify', 16 | 'as' => 'verification.verify', 17 | ]); -------------------------------------------------------------------------------- /src/Krucas/LaravelUserEmailVerification/RequiresEmailVerification.php: -------------------------------------------------------------------------------- 1 | email; 15 | } 16 | 17 | /** 18 | * Determine if user is verified or not. 19 | * 20 | * @return bool 21 | */ 22 | public function isUserEmailVerified() 23 | { 24 | return (bool) $this->verified; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Krucas/LaravelUserEmailVerification/RedirectsUsers.php: -------------------------------------------------------------------------------- 1 | verificationRedirectPath; 16 | } 17 | 18 | return property_exists($this, 'verificationRedirectTo') 19 | ? $this->verificationRedirectTo : route('verification.verify', [], false); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/translations/en/verification.php: -------------------------------------------------------------------------------- 1 | 'We have e-mailed your verification link!', 17 | 'token' => 'This verification token is invalid.', 18 | 'user' => "We can't find a user with that e-mail address.", 19 | 'subject' => 'You account verification link', 20 | 21 | ]; 22 | -------------------------------------------------------------------------------- /src/views/auth/verification/message.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layouts.app') 2 | 3 | 4 | @section('content') 5 |