forked from eatvio/eatvio-infra
PHP Insights added
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user