HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/sportivo.komma.pro/app/Komma/Page/PageController.php
<?php

namespace Komma\Page;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Response;
use Komma\Blog\BlogService;
use Komma\Mailers\MailService;

class PageController extends Controller
{

    public $data;
    protected $pageService;
    protected $blogService;
    protected $mailer;


    public function __construct(PageService $pageService, BlogService $blogService, MailService $mailer){;
        $this->pageService = $pageService;
        $this->blogService = $blogService;
        $this->mailer = $mailer;

        $this->data = [
            'socialMeda'      => false,
            'articleBlock'    => ['header' => 'Recente blog artikelen',
                                  'articles'=> $this->blogService->getLatestBlogItems(2),
                                  'footer'=>'Bekijk alle blog artikelen',
                                  'url'=>'/blog'],
            'link'            => 'http://' . $_SERVER['SERVER_NAME']
        ];
    }

    public function show()
    {
        $this->data = array_merge($this->data, $this->pageService->getContent('home'));
        $this->data['sportivoAction'] = $this->pageService->getAction();
        return \View::make('layouts.pages.home')->with('data', (object)$this->data);
    }

    public function action(){
        $this->data = array_merge($this->data, $this->pageService->getContent('action'));
        $this->data['content'] = $this->pageService->getActionPage();
        return \View::make('layouts.pages.defaultPage')->with('data', (object)$this->data);
    }

    public function nutrition(){
        $this->data = array_merge($this->data, $this->pageService->getContent('nutrition'));
        $this->data['content'] = $this->pageService->getNutritionPage();
        return \View::make('layouts.pages.defaultPage')->with('data', (object)$this->data);
    }

    public function personalTraining(){
        $this->data = array_merge($this->data, $this->pageService->getContent('personalTraining'));
        $this->data['content'] = $this->pageService->getPersonalTraining();
        return \View::make('layouts.pages.defaultPage')->with('data', (object)$this->data);
    }

    public function aboutUs($slug = null){
        $this->data = array_merge($this->data, $this->pageService->getContent('aboutUs'));
        return \View::make('layouts.pages.defaultPage')->with('data', (object)$this->data);
    }

    public function colleagues(){
        $this->data = array_merge($this->data, $this->pageService->getContent('colleagues'));
        $this->data['multiData'] = $this->pageService->getColleagues();
        return \View::make('layouts.pages.colleagues')->with('data', (object)$this->data);
    }

    public function facilities(){

        $this->data = array_merge($this->data, $this->pageService->getContent('facilities'));
        $this->data['multiData'] = $this->pageService->getFacilities();

        return \View::make('layouts.pages.modelView')->with('data', (object)$this->data);
    }

    public function references(){
        $this->data = array_merge($this->data, $this->pageService->getContent('references'));
        $this->data = array_merge($this->data, $this->pageService->getQuotes());
        return \View::make('layouts.pages.referencePage')->with('data', (object)$this->data);
    }

    public function partners(){
        $this->data = array_merge($this->data, $this->pageService->getContent('partners'));
        $this->data['partners'] = $this->pageService->getPartners();
        return \View::make('layouts.pages.partners')->with('data', (object)$this->data);
    }

    public function disclaimer(){
        $this->data = array_merge($this->data, $this->pageService->getContent('disclaimer'));
        return \View::make('layouts.pages.defaultPage')->with('data', (object)$this->data);
    }

    public function sitemap(){
        $this->data = array_merge($this->data, $this->pageService->getContent('sitemap'));
        $this->data = array_merge($this->data, ['groepslessen' => $this->pageService->getGroupLessonRoutes()]);
        return \View::make('layouts.pages.sitemap')->with('data', (object)$this->data);
    }

    public function sitemapXML(){
        $this->data = array_merge($this->data, $this->pageService->getContent('sitemap'));
        $this->data = array_merge($this->data, ['groepslessen' => $this->pageService->getGroupLessonRoutes(), 'blog' =>$this->blogService->getBlogRoutes()]);
        $page = \View::make('layouts.pages.sitemapXML')->with('data', (object)$this->data);
        return Response::make($page, 200)->header('Content-Type', 'application/xml');
    }
}