https://github.com/miloudimohamed/laraconfirm
Add email confirmation to your Laravel app
https://github.com/miloudimohamed/laraconfirm
email-confirmation laravel laravel-email-confirmation
Last synced: about 1 month ago
JSON representation
Add email confirmation to your Laravel app
- Host: GitHub
- URL: https://github.com/miloudimohamed/laraconfirm
- Owner: MiloudiMohamed
- License: mit
- Created: 2017-09-07T18:30:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-26T11:24:48.000Z (about 7 years ago)
- Last Synced: 2025-04-04T18:11:24.773Z (about 2 months ago)
- Topics: email-confirmation, laravel, laravel-email-confirmation
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Easy Email Confirmation for Your Laravel App
This composer package offers an easy way to add confirmation email step for your Laravel applications.
## Installation
Begin by pulling in the package through Composer.
```bash
composer require devmi/laraconfirm
```Next, if using Laravel 5, include the service provider within your `config/app.php` file.
(ignore this step if you using Laravel >= 5.5)```php
'providers' => [
Devmi\Laraconfirm\LaraconfirmServiceProvider::class,
];
```run your migration
```bash
php artisan migrate
```Then, replace those 3 traits and don't forget to import them under `Devmi\Laraconfirm\Traits\LaraconfirmLoginTrait`
in `App\Http\Controllers\Auth\LoginController;`
```php
use AuthenticatesUsers;
// By
use LaraconfirmLoginTrait;
```in `App\Http\Controllers\Auth\RegisterController;`
```php
use RegistersUsers;
// By
use LaraconfirmRegisterTrait;
```in `App\Http\Controllers\Auth\ResetPasswordController;`
```php
use ResetsPasswords;
// By
use LaraconfirmResetsPasswordsTrait;
```Finally, to get a nice feedback message add this code to you login page
```php
// resources\views\auth\login.blade.php@if (session('laraconfirmAlert'))
{!! session('laraconfirmAlert') !!}
@endif
// above the login form or anywhere you want
// the form is here below
...```
That's it! You'll now be able to confirm your member email before they login.