Well lumen is not made for views. It's strict there for api's. It shouldn't even have sessions at all! So whenever you need this functionality, you might want to switch to Laravel where you do have these features!
Anyway, this might help: https://github.com/laravel/framework/issues/21697#issuecomment-337066101