Skip to content

Commit

Permalink
formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shrikhakhalasi-easternts committed Sep 18, 2024
1 parent 5195a4b commit c8fc439
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Storage/EntryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function getSqlWithBindings($query)
*/
protected function whereSearch($query, EntryQueryOptions $options)
{
$query->where('content', 'like', '%' . $options->searchData . '%');
$query->where('content', 'like', '%'.$options->searchData.'%');

return $this;
}
Expand All @@ -106,13 +106,12 @@ protected function whereSearch($query, EntryQueryOptions $options)
*/
protected function whereDate($query, EntryQueryOptions $options)
{
if ($options->fromDate != "" && $options->toDate != "") {
if ($options->fromDate != '' && $options->toDate != '') {
$fromDate = date($options->fromDate);
$toDate = date($options->toDate);
$query->whereBetween('created_at', [$fromDate, $toDate]);
}


return $this;
}

Expand Down
1 change: 1 addition & 0 deletions src/Storage/EntryQueryOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public function fromDate(?string $fromDate)

return $this;
}

/**
* Set the tag that must belong to retrieved entries.
*
Expand Down

0 comments on commit c8fc439

Please sign in to comment.