ApiKey
class ApiKey extends Model
Traits
SoftDeletes
Constants
EVENT_NAME_CREATED |
|
EVENT_NAME_ACTIVATED |
|
EVENT_NAME_DEACTIVATED |
|
EVENT_NAME_DELETED |
|
Properties
static protected | $nameRegex | ||
protected | $table |
Methods
static string
generate()
Generate a secure unique API key
static
getByKey(string $key)
Get ApiKey record by key value
static bool
isValidKey(string $key)
Check if key is valid
static bool
isValidName(string $name)
Check if name is valid format
static bool
keyExists(string $key)
Check if a key already exists
static bool
nameExists(string $name)
Check if a name already exists
Details
at line 28
static string
generate()
Generate a secure unique API key
at line 42
static
getByKey(string $key)
Get ApiKey record by key value
at line 55
static bool
isValidKey(string $key)
Check if key is valid
at line 65
static bool
isValidName(string $name)
Check if name is valid format
at line 77
static bool
keyExists(string $key)
Check if a key already exists
Includes soft deleted records
at line 89
static bool
nameExists(string $name)
Check if a name already exists
Does not include soft deleted records