PHP Insights added

This commit is contained in:
Anatoliy Poloz
2023-12-18 14:51:58 +03:00
parent 31128488ac
commit 1b9998cdef
71 changed files with 1655 additions and 575 deletions

View File

@@ -40,13 +40,13 @@ class ListView extends Component
} elseif ($this->search && mb_strlen($this->search) > 2) {
$posts = BlogPost::where('title', 'rlike', $this->search);
} else {
$posts = (new BlogPost);
$posts = (new BlogPost());
}
if ($this->typeFilter == 'user') {
if ($this->typeFilter === 'user') {
$posts = $posts->whereRelation('author', 'is_consultant', false);
}
if ($this->typeFilter == 'consultant') {
if ($this->typeFilter === 'consultant') {
$posts = $posts->whereRelation('author', 'is_consultant', true);
}