mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
->when(app()->environment('production'),
This commit is contained in:
@@ -18,8 +18,9 @@ class ArticleOverview extends Component
|
|||||||
'tags',
|
'tags',
|
||||||
])
|
])
|
||||||
->where('type', 'markdown_article')
|
->where('type', 'markdown_article')
|
||||||
->whereHas('createdBy.roles',
|
->when(app()->environment('production'),
|
||||||
fn($query) => $query->where('roles.name', 'news-editor'))
|
fn($query) => $query->whereHas('createdBy.roles',
|
||||||
|
fn($query) => $query->where('roles.name', 'news-editor')))
|
||||||
->orderByDesc('created_at')
|
->orderByDesc('created_at')
|
||||||
->get(),
|
->get(),
|
||||||
])->layout('layouts.app', [
|
])->layout('layouts.app', [
|
||||||
|
|||||||
Reference in New Issue
Block a user