|
|
@@ -98,6 +98,11 @@ abstract class AbstractFilter
|
|
|
*/
|
|
|
public $group;
|
|
|
|
|
|
+ /**
|
|
|
+ * @var bool
|
|
|
+ */
|
|
|
+ protected $ignore = false;
|
|
|
+
|
|
|
/**
|
|
|
* AbstractFilter constructor.
|
|
|
*
|
|
|
@@ -253,6 +258,10 @@ abstract class AbstractFilter
|
|
|
*/
|
|
|
public function condition($inputs)
|
|
|
{
|
|
|
+ if ($this->ignore) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
$value = Arr::get($inputs, $this->column);
|
|
|
|
|
|
if ($value === null) {
|
|
|
@@ -264,6 +273,18 @@ abstract class AbstractFilter
|
|
|
return $this->buildCondition($this->column, $this->value);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Ignore this query filter.
|
|
|
+ *
|
|
|
+ * @return $this
|
|
|
+ */
|
|
|
+ public function ignore()
|
|
|
+ {
|
|
|
+ $this->ignore = true;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Select filter.
|
|
|
*
|