25 lines
512 B
PHP
25 lines
512 B
PHP
<?php
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Backpack\PageManager\app\Models\Page;
|
|
class PageController extends Controller
|
|
{
|
|
public function index($slug, $subs = null)
|
|
{
|
|
$page = Page::findBySlug($slug);
|
|
|
|
if (!$page)
|
|
{
|
|
abort(404, 'Please go back to our <a href="'.url('').'">homepage</a>.');
|
|
}
|
|
|
|
$this->data['title'] = $page->title;
|
|
$this->data['page'] = $page->withFakes();
|
|
|
|
return view('desktop.Pages.AboutPage', $this->data);
|
|
}
|
|
|
|
}
|