Setting the Session Store Implementation

Problem

You want to change the form's session store implementation.

Solution

Use the Form::setSessionStore() method.

$session = new MySessionHandler;
Form::setSessionStore($session);

Discussion

This is most useful for testing.

If you're unit testing a form macro you've created, this method allows you to mock the session store implementation as needed.

comments powered by Disqus