style updates
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Pages\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\View\View;
|
||||
use Modules\Pages\Models\Page;
|
||||
final class PublicPageController extends Controller { public function show(string $slug): View { $page=Page::query()->where('slug',$slug)->where('status','published')->where(fn($q)=>$q->whereNull('published_at')->orWhere('published_at','<=',now()))->firstOrFail(); return view('pages::public.show',compact('page')); } }
|
||||
|
||||
final class PublicPageController extends Controller
|
||||
{
|
||||
public function show(string $slug): View
|
||||
{
|
||||
$page = Page::query()->where('slug', $slug)->where('status', 'published')->where(fn ($q) => $q->whereNull('published_at')->orWhere('published_at', '<=', now()))->firstOrFail();
|
||||
|
||||
return view('pages::public.show', compact('page'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user