Files
SonarDesk-Licencing-Server/app/Http/Controllers/CmsPageController.php
T
2026-09-29 11:12:07 +01:00

15 lines
397 B
PHP

<?php
namespace App\Http\Controllers;
use App\Models\CmsPage;
final class CmsPageController extends Controller
{
public function show(string $slug)
{
$page = CmsPage::where('slug', $slug)->where('is_published', true)->where(fn ($q) => $q->whereNull('published_at')->orWhere('published_at', '<=', now()))->firstOrFail();
return view('cms.show', compact('page'));
}
}