SimplePage render custom view data?

Hello,

I'm trying to create a SimplePage that non-logged in users can view. I'm just having a issue where the data set in
getViewData()
or a custom
render()
function is not showing up to the view?


I've tried ovewriting the following and everything works except passing in data. I even tried just putting the data manually where $this->getViewData() is. I know I can use $this->variableName but I'd really not like to do that since people can see that data right? I just want to render some data.

public function render(): View
    {
        return view(self::$view, $this->getViewData())
            ->layout(self::$layout, [
                'livewire' => $this,
                'maxContentWidth' => 'full',
                ...[],
            ]);
    }


TDLR: Passing data to render() is not working but manually entering the data variables in mount() works.
Was this page helpful?