File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -78,23 +78,27 @@ public function where($criteria, $value = null){
7878 }
7979
8080 /**
81- * @param mixed $value
81+ * @param \Closure $closure
8282 *
83- * @return WhereQuery
84- * @throws InvalidWhereQueryCriteriaException
83+ * @return $this
8584 */
86- public function orWhere ($ value ){
87- return $ this ->where ('OR ' , $ value );
85+ public function orWhere (\Closure $ closure = null ){
86+ $ this ->query ->push (['OR ' ]);
87+ if ($ closure !== null ) $ closure ($ this );
88+
89+ return $ this ;
8890 }
8991
9092 /**
91- * @param mixed $value
93+ * @param \Closure $closure
9294 *
93- * @return WhereQuery
94- * @throws InvalidWhereQueryCriteriaException
95+ * @return $this
9596 */
96- public function andWhere ($ value ){
97- return $ this ->where ('AND ' , $ value );
97+ public function andWhere (\Closure $ closure = null ) {
98+ $ this ->query ->push (['AND ' ]);
99+ if ($ closure !== null ) $ closure ($ this );
100+
101+ return $ this ;
98102 }
99103
100104 /**
You can’t perform that action at this time.
0 commit comments