FleetCart/Modules/Page/Http/Controllers/PageController.php
2023-12-03 14:07:47 +00:00

26 lines
555 B
PHP

<?php
namespace Modules\Page\Http\Controllers;
use Illuminate\Http\Response;
use Modules\Page\Entities\Page;
use Modules\Media\Entities\File;
class PageController
{
/**
* Display page for the slug.
*
* @param string $slug
*
* @return 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'));
}
}