Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 #22

Merged
merged 2 commits into from
Oct 18, 2024
Merged

V2 #22

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Enums/Comparators/Condition.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace TeamQ\Datatables\Enums\Comparators;

enum Condition: string
{
case And = '$and';
case Or = '$or';
}
4 changes: 2 additions & 2 deletions src/Scribe/Strategies/Documentations/Filters/DateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function __invoke(Filter|Sort|Collection|string $param, mixed $value = nu
<ul>
<li><b>{$name}=2023-04-01</b><br>It is evaluated by equals.</li>
<li><b>{$name}[value]=2023-04-01</b><br>It is evaluated by equals.</li>
<li><b>{$name}[value]=2023-04-01&{$name}[operator]=5</b><br>It is evaluated by operator 5 (LessThan).</li>
<li><b>{$name}[value][0]=2023-04-01&{$name}[value][1]=2023-07-30&{$name}[operator]=7</b><br>It is evaluated by operator 7 (Between). This operator will only take the first two 'values' however operators like 'In' will take the entire array of 'values'</li>
<li><b>{$name}[value]=2023-04-01&{$name}[operator]=\$lt</b><br>It is evaluated by operator 5 LessThan.</li>
<li><b>{$name}[value][0]=2023-04-01&{$name}[value][1]=2023-07-30&{$name}[operator]=\$between</b><br>It is evaluated by operator Between. This operator will only take the first two 'values' however operators like 'In' will take the entire array of 'values'</li>
</ul>
Valid comparison operators are:
<ul>
Expand Down
4 changes: 2 additions & 2 deletions src/Scribe/Strategies/Documentations/Filters/NumberFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function __invoke(Filter|Sort|Collection|string $param, mixed $value = nu
<ul>
<li><b>{$name}=20</b><br>It is evaluated by equals.</li>
<li><b>{$name}[value]=20</b><br>It is evaluated by equals.</li>
<li><b>{$name}[value]=20&{$name}[operator]=5</b><br>It is evaluated by operator 5 (LessThan).</li>
<li><b>{$name}[value][0]=20&{$name}[value][1]=20&{$name}[operator]=5</b><br>It is evaluated by operator 7 (Between). This operator will only take the first two 'values' however operators like 'In' will take the entire array of 'values'.</li>
<li><b>{$name}[value]=20&{$name}[operator]=\$lt</b><br>It is evaluated by operator LessThan.</li>
<li><b>{$name}[value][0]=20&{$name}[value][1]=20&{$name}[operator]=\$between</b><br>It is evaluated by operator Between. This operator will only take the first two 'values' however operators like 'In' will take the entire array of 'values'.</li>
</ul>
Valid comparison operators are:
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __invoke(Filter|Sort|Collection|string $param, mixed $value = nu
<ul>
<li><b>{$name}=Luis</b> It is evaluated by equals.</li>
<li><b>{$name}[value]=Luis</b> It is evaluated by equals.</li>
<li><b>{$name}[value]=Luis&{$name}[operator]=5</b> It is evaluated by operator 5 (EndWith).</li>
<li><b>{$name}[value]=Luis&{$name}[operator]=\$endWith</b> It is evaluated by operator EndWith.</li>
</ul>
Valid comparison operators are:
<ul>
Expand Down
Loading