fix: Fix news.show request - Sentry LE-GAULOIS-7M
This commit is contained in:
parent
12b667f5cf
commit
b94807533b
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ class NewsController extends Controller
|
|||
public function show(string $slug): \Illuminate\Contracts\View\View
|
||||
{
|
||||
/** @var \App\Models\News|null $newsModel Current news model */
|
||||
$newsModel = News::query()->where('slug', $slug)->with('newsCategory')->first();
|
||||
$newsModel = News::query()->where('slug', $slug)->where('published', true)->with('newsCategory')->firstOrFail();
|
||||
$asideNewsModels = News::query()
|
||||
->orderByRaw('news_category_id = ? DESC', [$newsModel->news_category_id])
|
||||
->where([
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue