Hi Guys, so if anyone would be struggling with unsetting the cookies during logout if you have forum in subfolder (not sub-domain) like my example www.mydomain.com/subfolder/forum/
To logout I had to unset the cookies this way:
setcookie('flarum_remember', null, time(), '/', '.www.mydomain.com', false, true);
setcookie('flarum_session', null, time(), '/subfolder/forum', '', false, true);