updates for admin area
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\ContentPage;
|
||||
use Illuminate\View\View;
|
||||
|
||||
class ContentPageController extends Controller
|
||||
{
|
||||
public function show(ContentPage $page): View
|
||||
{
|
||||
abort_unless($page->status === 'published' && ($page->published_at === null || $page->published_at->isPast()), 404);
|
||||
|
||||
return view('content.show', compact('page'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user