FleetCart/Modules/Page/Http/Controllers/PageController.php
2023-06-11 13:14:03 +01:00

24 lines
533 B
PHP

<?php
namespace Modules\Page\Http\Controllers;
use Modules\Page\Entities\Page;
use Modules\Media\Entities\File;
class PageController
{
/**
* Display page for the slug.
*
* @param string $slug
* @return \Illuminate\Http\Response
*/
public function show($slug)
{
$logo = File::findOrNew(setting('storefront_header_logo'))->path;
$page = Page::where('slug', $slug)->firstOrFail();
return view('public.pages.show', compact('page', 'logo'));
}
}