dillingham / formation

Laravel search, sort, and filters
MIT License
0 stars 0 forks source link

trueOnly falseOnly #39

Closed dillingham closed 2 years ago

dillingham commented 2 years ago

maybe for some filters that allow boolean but dont want to allow inverse

like:exists=true might be desired, but like:exists=false might not

avoids things like scope & scopeBoolean

public function trueOnly()
{
    return $this->withRules(['in:true']);
}

public function falseOnly()
{
    return $this->withRules(['in:false']);
}