PHP code example of genealabs / laravel-registrar

1. Go to this page and download the library: Download genealabs/laravel-registrar 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/ */

    

genealabs / laravel-registrar example snippets


GeneaLabs\LaravelRegistrar\Providers\LaravelRegistrarService::class,

use GeneaLabs\LaravelRegistrar\Traits\ActivatesUsers;

//class LoginController extends Controller
//{
    use ActivatesUsers {
        ActivatesUsers::attemptLogin insteadof AuthenticatesUsers;
    }

use GeneaLabs\LaravelRegistrar\Traits\Activatable;

//class User
//{
 use Activatable;

public function getCanBeActivatedAttribute() : bool
{
    // return true or false based on your specific condition.
}

protected static function sendNotification()
{
    static::created(function ($user) {
        $user->notify(new MyOwnNotificationClass($user));
    });
}