PHP code example of mijatovicmilan / laravel-password-generator

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

    

mijatovicmilan / laravel-password-generator example snippets


return [
    // Minimum password length
    "minimum_password_length" => 6,

    // If password length is not passed we will use this length instead
    "default_password_length" => 6,

    // If password strength is not passed we will use this strength instead
    "default_password_strength" => 2,
];

use MijatovicMilan\LaravelPasswordGenerator\Actions\GeneratePassword;

$password = (new GeneratePassword)(12, 2);

use MijatovicMilan\LaravelPasswordGenerator\Actions\GeneratePassword;

public function something(GeneratePassword $generatePassword) {
    $password = $generatePassword();
}
bash
php artisan vendor:publish --tag="password-generator-config"