add similar posts
This commit is contained in:
parent
e87510b130
commit
f33e16b198
8 changed files with 128 additions and 8 deletions
|
|
@ -18,7 +18,7 @@ class PostRepositoryQuery extends RepositoryQuery
|
|||
parent::__construct($repository, 'p', $paginator);
|
||||
}
|
||||
|
||||
public function inCategory(Category $category, bool $strict = true)
|
||||
public function inCategory(Category $category, bool $strict = true): self
|
||||
{
|
||||
$c = 'c'.mt_rand();
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ class PostRepositoryQuery extends RepositoryQuery
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function published()
|
||||
public function published(): self
|
||||
{
|
||||
return $this
|
||||
->andWhere('.status = 1')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue