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
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')
}
$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);
}