A simple function to generate a random token
Installation of random token is through composer.
To get started quickly, run the following command
composer require kevinkaske/random-token
Call the following function to get a random token string. The default length is 40 characters;
getToken();
You can pass in another int for length if you need something longer or shorter than 40.
getToken(22);