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 | ||
| protected | $fillable |
Methods
static string
generate()
Generate a secure unique API key
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 50
static string
generate()
Generate a secure unique API key
at line 72
static ApiKey|null
getByKey(string $key)
Get ApiKey record by key value
at line 85
static bool
isValidKey(string $key)
Check if key is valid
at line 93
static bool
isValidName(string $name)
Check if name is valid format
at line 103
static bool
keyExists(string $key)
Check if a key already exists
Includes soft deleted records
at line 115
static bool
nameExists(string $name)
Check if a name already exists
Does not include soft deleted records