yii2tech/illuminate

Flash messages doesn't work

Orange-Men opened this issue · 1 comments

What steps will reproduce the problem?

When sticking to the plan to refactoring:
Model -> Controller -> View
When refactoring a Model and set some flash message these messages not moved to the Yii2 side.

E.g.:
Refactoring LoginController and set some flash message(Laravel side), which should move to Yii2 and come up in its view.

protected function authenticated(Request $request, $user)
{
    ...
    session()->flash("info", "Welcome!");
}

Is it possible to temporarily allow this movement?

Q A
This Package Version dev-master
Laravel Framework Version 6.16.0
Yii Framework Version 2.0.32
PHP version 7.2.24
Operating system ubuntu 18.04.3

You should setup a session bridge to share session between Laravel and Yii.
See: https://github.com/yii2tech/illuminate/blob/master/docs/start-session-and-authentication.md

Also make sure Yii application running within \Illuminate\Session\Middleware\StartSession middleware.