Fix public pages not showing properly #708 (#749)

This commit is contained in:
Nabeel S
2020-06-05 09:49:22 -07:00
committed by GitHub
parent c6482bd160
commit 340f52112d
2 changed files with 14 additions and 11 deletions

View File

@@ -28,10 +28,13 @@ class PageLinksComposer extends Composer
public function compose(View $view)
{
try {
$w = [
'enabled' => true,
];
// If not logged in, then only get the public pages
$w = ['enabled' => true];
if (!Auth::check()) {
$w = ['public' => true];
$w['public'] = true;
}
$pages = $this->pageRepo->findWhere($w, ['id', 'name', 'slug', 'icon']);