private static function keyExists($key)
    {
        $apiKeyCount = self::where('key', '=', $key)->limit(1)->count();

        if ($apiKeyCount > 0) return true;

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

        if ($apiKeyCount > 0) return true;

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

@param $key
@return bool
Checks whether a key exists in the database or not