]> _ Git - cubist_cms-back.git/commitdiff
#2878
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 10 Jul 2019 10:26:49 +0000 (12:26 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 10 Jul 2019 10:26:49 +0000 (12:26 +0200)
src/app/Http/Controllers/CubistFrontController.php

index 9b3f836eb9092ecc2dd6184834d7b249b68290c3..9fb83fad5828c0ccc9fc54fd59e2b7c7a66bd709 100644 (file)
@@ -6,6 +6,7 @@ namespace Cubist\Backpack\app\Http\Controllers;
 use App\Models\Page;
 use Cubist\Backpack\app\Magic\Models\CMSPage;
 use Cubist\Backpack\app\Magic\Models\Settings;
+use Cubist\Backpack\app\Magic\PageData;
 use Illuminate\Routing\Controller as BaseController;
 
 class CubistFrontController extends BaseController
@@ -14,7 +15,7 @@ class CubistFrontController extends BaseController
 
     public function __construct()
     {
-        $this->data['global'] = Settings::find(1)->withFakes()->getDecodedAttributes();
+        $this->data['global'] = new PageData(Settings::find(1)->withFakes()->getDecodedAttributes());
     }
 
     public function index($slug = 'home')
@@ -27,7 +28,7 @@ class CubistFrontController extends BaseController
         }
 
         $this->data['title'] = $page->title;
-        $this->data['page'] = $page->withFakes()->getDecodedAttributes();
+        $this->data['page'] = new PageData($page->withFakes()->getDecodedAttributes());
 
         return view('pages.' . $page->template, $this->data);
     }