File: D:/HostingSpaces/SBogers96/smilefotografie.nl/app/Komma/Seo/SEOController.php
<?php
namespace Komma\Seo;
use Illuminate\Routing\Controller;
class SEOController extends Controller
{
/**
* @var SitemapService
*/
private $sitemapService;
/**
* SEOController constructor.
* @param SitemapService $sitemapService
*/
public function __construct(SitemapService $sitemapService)
{
$this->sitemapService = $sitemapService;
}
/**
* Sitemap.xml
* @return mixed
*/
public function sitemap()
{
$sitemap = $this->sitemapService->getSitemap([
'pages',
'business_albums',
'private_albums',
'free_work_albums',
]);
return $sitemap->render('xml');
}
/**
* Robots.txt
* @return mixed
*/
public function robots()
{
$view = \View::make('seo.robots')->render();
return \Response::make($view, '200')->header('Content-Type', 'text/plain');
}
}