ldc-nature-and-respect/app/Http/Controllers/Fo/PageController.php
2023-04-03 10:47:55 +00:00

23 lines
433 B
PHP

<?php
namespace App\Http\Controllers;
use App\Page;
class PageController extends Controller
{
/**
* Page show
*
* @param string $slug
* @return \Illuminate\Contracts\View\View
*/
public function index(string $slug)
{
$page = Page::where('slug', $slug)->first();
if ($page == null) {
abort(404);
}
return view('pages.page', compact('page'));
}
}