Chrisbjr\ApiGuard\Repositories\ApiKeyRepository::keyExists PHP Метод

keyExists() приватный статический Метод

Checks whether a key exists in the database or not
private static keyExists ( $key ) : boolean
$key
Результат boolean
    private static function keyExists($key)
    {
        $apiKeyCount = self::where('key', '=', $key)->limit(1)->count();
        if ($apiKeyCount > 0) {
            return true;
        }
        return false;
    }