PHP code example of robsonala / laravel-crypto-user

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

    

robsonala / laravel-crypto-user example snippets


php artisan vendor:publish
// Select `Robsonala\CryptoUser\CryptoUserProvider`
php artisan migrate

...
use Robsonala\CryptoUser\Services\Actions;
...
protected function create(array $data)
{
    $user = User::create([
        'name' => $data['name'],
        'email' => $data['email'],
        'password' => bcrypt($data['password']),
    ]);

    Actions::register($user, $data['password']);

    return $user;
}
...