rorikurniadi/laravel-activator

Laravel activator provides activation & resend activation account

v1.0.0 2016-10-18 18:09 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:36:55 UTC


README

Laravel activator provides activation & resend activation account.

Installation

composer require rorikurniadi/laravel-activator

Setup

Register in config/app.php

    'providers' => [
        #...
        Rorikurn\Activator\ActivatorServiceProvider::class
    ],

    'aliases' => [
        #...
        'Activator' => 'Rorikurn\Activator\Facades\Activator'
    ]

Migration

php artisan migrate --path="vendor/rorikurniadi/laravel-activator/database/migrations"

Publish Views & Config File

php artisan vendor:publish --force

Usage

Integrate with your Registration Process

    # app/Http/Controllers/Auth/RegisterController

    protected function create(array $data)
    {
        // Create User
        $user = User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
        ]);

        return Activator::activate($user);
    }

This is beta version.