Creating keys
composer require langsys/laravel-api-keys use Langsys\ApiKeys\Models\ApiKey;
$key = ApiKey::create(['name' => 'mobile-app', 'type' => 'write']);
// The plaintext is available exactly once, right after generation:$key->plain_key; // "x7Qa...64 chars" — show this to the user now; it is never stored.Only a sha256 hash of the key is persisted (key_hash). Resolve a key from a plaintext value with ApiKey::getByKey($plain) (returns null if unknown).
Key types: read, write, and ip_write.