File: D:/HostingSpaces/PDeckers/opelkapitan.nl/app/Komma/Photos/PhotoController.php
<?php
namespace Komma\Photos;
use Komma\Pages\PageService;
use Komma\Photos\Models\Photo;
class PhotoController extends \BaseController
{
private $pageService;
public function __construct(PageService $pageService)
{
$this->pageService = $pageService;
}
public function show()
{
$data = (object)[
'content' => Photo::where('code_name', 'fotoalbum')->with('translation')->with('images')->first(),
'links' => $this->pageService->getAllRoutes()
];
$data->content->translation->meta_title = $data->content->translation->name.' | Opel Kapitän';
$data->content->translation->meta_description = $data->content->translation->name.' | Opel Kapitän';
return \View::make('layouts.pages.photos')
->with('data', $data);
}
}