session known in all whole project

hi there

how can i have a session that known in whole project(backend’s controllers and frontend’s)?

thanks

If both frontend and backend share the same domain or are on subdomains of the same domain you can set cookies and session names to match and to be used by both.

http://www.yiiframework.com/doc-2.0/guide-tutorial-shared-hosting.html#separate-sessions-and-cookies shows where it can be done. Actual options there are about separating these but you should get an idea.