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