PHP code example of juststeveking / laravel-key-factory
1. Go to this page and download the library: Download juststeveking/laravel-key-factory 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/ */
juststeveking / laravel-key-factory example snippets
return [
'key' => [
'length' => 20,
]
];
$key = \JustSteveKing\KeyFactory\KeyFactory::generate(
prefix: 'test', // what you want to prefix your keys with.
length: 20, // optional - the default of 20 is set in the config.
);
$key = \Illuminate\Support\Str::key(
prefix: 'test', // what you want to prefix your keys with.
length: 20, // optional - the default of 20 is set in the config.
);