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
]);
}
}