I\'m having a lot of problems and I really can\'t seem to find a solution.
Yesterday, I finished up doing some work on a vagrant box in Laravel. When I shut down the com
I spent a whole day with the same issue (session regenerated with almost every request), and could not find anything helpful online. Posting this here in case somebody has the same issue.
Basically the problem was that the session cookie was not set correctly due to template errors. So if you run into this, first check that the session cookie is set with every request via http headers.
In my case I wrongly used something like this in some of my templates:
@section('test')
Some content here
@endsection
This is wrong!
In Laravel 4 it needs to be @stop instead of @endsection:
@section('test')
Some content here
@stop
Using @endsection made the app not finish correctly, so no session cookie was set. There is no trace of anything being wrong in the logfiles however. BTW, this kind of error also leads to after-filters not being applied.