diff --git a/src/Libs/Model.php b/src/Libs/Model.php index 566c2e6..9d09a1c 100644 --- a/src/Libs/Model.php +++ b/src/Libs/Model.php @@ -166,9 +166,9 @@ class Model throw new Exception( "\nError at query to database.\n" . - "Query: $query\n" . - "Vars: $vars\n" . - "Error:\n" . $e->getMessage() + "Query: $query\n" . + "Vars: $vars\n" . + "Error:\n" . $e->getMessage() ); } @@ -731,30 +731,30 @@ class Model } /** - * Defines WHERE using EXIST in the SQL statement. + * Defines WHERE using EXISTS in the SQL statement. * * @param string $query * SQL query. * * @return static */ - public static function whereExist(string $query): static + public static function whereExists(string $query): static { - static::where($column, 'EXIST', "($query)", true); + static::where('', 'EXISTS', "($query)", true); return new static(); } /** - * Defines WHERE using NOT EXIST in the SQL statement. + * Defines WHERE using NOT EXISTS in the SQL statement. * * @param string $query * SQL query. * * @return static */ - public static function whereNotExist(string $query): static + public static function whereNotExists(string $query): static { - static::where($column, 'NOT EXIST', "($query)", true); + static::where('', 'NOT EXISTS', "($query)", true); return new static(); }