Add encrypted Etsy app credential settings
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 23s

This commit is contained in:
Hickmeister
2026-10-10 19:08:46 +01:00
parent 89e392e5f8
commit 88dcf5101b
12 changed files with 350 additions and 8 deletions
@@ -0,0 +1,28 @@
<?php
namespace Database\Seeders;
use App\Models\EtsyAppCredential;
use Illuminate\Database\Seeder;
class EtsyAppCredentialSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$keystring = config('services.etsy.keystring');
$sharedSecret = config('services.etsy.shared_secret');
if (filled($keystring) && filled($sharedSecret)) {
if (EtsyAppCredential::find(1) === null) {
$credentials = new EtsyAppCredential;
$credentials->id = 1;
$credentials->keystring = $keystring;
$credentials->shared_secret = $sharedSecret;
$credentials->save();
}
}
}
}