private static function keyExists($key) { $apiKeyCount = self::where('key', '=', $key)->limit(1)->count(); if ($apiKeyCount > 0) { return true; } return false; }