mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
query changed
This commit is contained in:
@@ -38,12 +38,12 @@ class ArticleOverview extends Component
|
|||||||
if (auth()->user() && auth()
|
if (auth()->user() && auth()
|
||||||
->user()
|
->user()
|
||||||
->hasRole('news-editor')) {
|
->hasRole('news-editor')) {
|
||||||
} else {
|
return;
|
||||||
$query
|
|
||||||
->whereHas('createdBy.roles',
|
|
||||||
fn($query) => $query->where('roles.name', 'news-editor'))
|
|
||||||
->where('approved', true);
|
|
||||||
}
|
}
|
||||||
|
$query
|
||||||
|
->whereHas('createdBy.roles',
|
||||||
|
fn($query) => $query->where('roles.name', 'news-editor'))
|
||||||
|
->where('approved', true);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
->orderByDesc('created_at')
|
->orderByDesc('created_at')
|
||||||
|
|||||||
Reference in New Issue
Block a user