unique cookie for each yii2 app

Hi, i has multiple yii2 installed.

I has some common cookie name use for all my app.

What is the best way to make cookie with same name unique for each app.

Right now i just add a prefix to the cookie name to achieve that.

Cookie are bind to the domain name, if your apps run all on the same domain, the only way to have them separated is to change the cookie name like you do now.

For instance you prefix the cookie name with the app name(you can use either id or name value from @app/config/main.php) , so same code to manage the cookie, the name change according to the configuration, only one place to change the name prefix.

I see, thx for the explaination. So i got nothing to worry about cookie.