diff --git a/src/Storage/EntryModel.php b/src/Storage/EntryModel.php index 415749931..334a483bd 100644 --- a/src/Storage/EntryModel.php +++ b/src/Storage/EntryModel.php @@ -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; } @@ -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; } diff --git a/src/Storage/EntryQueryOptions.php b/src/Storage/EntryQueryOptions.php index 667b0da02..d72c51d9d 100644 --- a/src/Storage/EntryQueryOptions.php +++ b/src/Storage/EntryQueryOptions.php @@ -114,6 +114,7 @@ public function fromDate(?string $fromDate) return $this; } + /** * Set the tag that must belong to retrieved entries. *