In my opinion you would be better off using version 5.1 until that middleware web stuff is completely fixed including in the documentation I see more users is having confusion over that stuff. Plus there has been a lot of session problems it seems like. To me 5.1 was very easy to install and the documentation was very easy to understand. Just my two cents here. There Was An Old Post on the io forum showing how to disable the csrf but I don't know if it will apply to 5.2 or not and you would have to go back and search the Io forum.
Mar 30, 2016
6
Level 1
[L5.2] Disable CSRF, keep Session
I'm testing an app that has to redirect outside Laravel at the end of the controller action and I'm having trouble following the redirect. I assume the problem comes from the web middleware which adds the CSRF cookies so I end up with "headers already sent" error, even though interacting manually with the page works fine. Disabling middleware for the test with use WithoutMiddleware; complains about the Session store not being set.
Here's the test code
use WithoutMiddleware;
public function testSuccessfulSignup(){
$input = array(
'mail'=>'test@mail.com',
'first_name'=>'Philip',
'last_name'=>'J Fry',
);
Input::replace($input);
$response = $this->call('POST', 'trials', $input);
assert($response->assertResponseStatus(302)) ;
assert($response->assertRedirectedTo('https://store.domain.com'));
}
The page returns a 500 with this exception Session store not set on request.
Please or to participate in this conversation.