PHP code example of cndrsdrmn / passwords

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

    

cndrsdrmn / passwords example snippets


return [
    // ...
    Cndrsdrmn\Passwords\PasswordsServiceProvider::class,
],

use Cndrsdrmn\Passwords\Contracts\OtpPasswordBroker as OtpBrokerContract;
use Illuminate\Support\Facades\Password;

$status = Password::markVerified([
    'email' => $request->email,
    'token' => $request->input('otp'),
]);

if ($status !== OtpBrokerContract::VERIFIED_TOKEN) {
    return back()->withErrors(['token' => __($status)]);
}
shell
php artisan migrate
shell
php artisan vendor:publish --tag=passwords-migrations
php artisan vendor:publish --tag=passwords-lang