PHP code example of alexwinder / laravel-confirm-new-email

1. Go to this page and download the library: Download alexwinder/laravel-confirm-new-email 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/ */

    

alexwinder / laravel-confirm-new-email example snippets


'providers' => [
    ...
    AlexWinder\ConfirmNewEmail\ConfirmNewEmailServiceProvider::class,
    ...
],

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => Namespace\Of\Your\User\Model\User::class,
        'table' => 'users'
    ],
],



namespace App;

use Illuminate\Database\Eloquent\Model;

class User extends Authenticatable
{
    /**
    * The attributes that are mass assignable.
    *
    * @var array
    */
    protected $fillable = [
        'name', 'email', 'password',
    ];
}

    

    namespace App;

    use Illuminate\Database\Eloquent\Model;

    class User extends Model
    {
        /**
        * Get the user's e-mail address.
        *
        * @return string
        */
        public function getEmailAttribute()
        {
            return $this->your_current_email_address_attribute;
        }
    }
    

    

    namespace App;

    use Illuminate\Database\Eloquent\Model;

    class User extends Authenticatable
    {
        /**
        * The attributes that are mass assignable.
        *
        * @var array
        */
        protected $fillable = [
            'name', 'email', 'password', 'email_verified_at',
        ];
    }
    
shell
php artisan vendor:publish --provider="AlexWinder\ConfirmNewEmail\ConfirmNewEmailServiceProvider" --tag="config"
shell
php artisan vendor:publish --provider="AlexWinder\ConfirmNewEmail\ConfirmNewEmailServiceProvider" --tag="views"