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/immoginis.komma.pro/app/Komma/Pages/PageController.php
<?php

namespace Komma\Pages;

use Illuminate\Http\Request;
use Komma\BaseController;
use Komma\Properties\PropertyService;

class PageController extends \BaseController
{

    public $data;
    protected $pageService;
    protected $propertyService;

    public function __construct(PageService $pageService, PropertyService $propertyService){
        parent::__construct();
        $this->pageService = $pageService;
        $this->propertyService = $propertyService;

        $this->data = (object)[];
    }

    public function show($id = 2){

        $this->data->id = $id;
        $this->data->content = $this->pageService->getPageContent($id);

        if($id =2){
            $formInfo = $this->propertyService->getForminfo();
            return \View::make('layouts.pages.'.$this->data->content->code_name)
                ->with([
                    'data' => $this->data,
                    'formInfo' => $formInfo,
                    'cities' => $this->propertyService->getCities(),
                    'citySets' => $this->propertyService->getCitySets(),
                ]);
        }

        return \View::make('layouts.pages.'.$this->data->content->code_name)
            ->with([
                'data' => $this->data
            ]);
    }
}