This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Stranger Pings
Stranger Pings

Hi there,

How can I pass a number of variables through a redirect?

I have so far


$this->title = 'Hello';
$this->year = '2015';

and


return Redirect::to('/result')->with($title, $year);

But it says


Undefined variable: title

and when I add something like


$year = '2015';

and in the view


{{ this.page.year }}

Nothing gets passed though. Am I going about this the wrong way?

Stranger Pings
Stranger Pings

shameless bump :P

ian27041
ian27041

in case others run into this question, the solution is to use the Session on the receiving page to access the passed data. see https://octobercms.com/docs/services/response-view#redirect-flash-data for more info.

themains226819
themains226819

Sorry to bring up an old thread. I am using the SteamAuth plugin that is supposed to add the Steam Info into the Session and redirects to my redirect page. in Routes.php return Redirect::to($redirectUrl)->with('steamuser', $auth->getUserInfo());

However, the steamuser Session key is not present on my redirect page after the SteamAuth plugin redirects. The getUserInfo method is working as when I dd the object I see all the Steam Info for my user. Anyone know what could be wrong? I don't think this is an issue with the Plugin directly as everything other then the Session being set works.

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.