Laravel 11 or higher required
This package is so SecondLife residents can edit their inworld products through a webconfig. Designed to be used for GridPlay Productions. Frontend coding required!
"repositories": [{
"type": "vcs",
"url": "https://github.com/gridplay/gpwebconfig"
}
],
"require": {
"gridplay/gpwebconfig": "dev-main",
}
php artisan vendor:publish --provider="WebConfig\WCServiceProvider"
$array = ['resident' => $sluuid];
$length = 24;
$code = WebConfig::genCode($array, $length);
// $code generates a code of $length that lasts for default 10 minutes
// expiration can be configured in the gpwebconfig.php
// To validate code and get $array
if ($valid = WebConfig::ValidateCode($code)) {
$sluuid = $valid['resident'];
}
if (WebConfig::getExpiration($code) < time()) {
WebConfig::deleteCode($code);
}