PHP code example of kletellier / lara-random

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

    

kletellier / lara-random example snippets


// config/app.php

'providers' => [
    ...
    Kletellier\Random\RandomServiceProvider::class,
    ...
];

// config/app.php

'aliases' => [
	  ...
        'Random' => Kletellier\Random\RandomFacade::class
    ...
]

// Generate a random string that is 64 bytes in length.
$string = Random::generate(64);

// Generate a whole number between 0 and 100.
$int = Random::generateInt(0, 100);

// Generate a 64 character string.
$string = Random::generateString(64);
bash
php artisan vendor:publish --provider="Kletellier\Random\RandomServiceProvider"