Is there a way to call Conn.put_resp_cookie/4? There is no need to turn liveview into a traditional controller function.
updated Hook, read and write.
Is there a better way?
That’s probably the best way, the issue with trying to do it any other way is that if you get to that page via
live_link then there is no HTTP request done that would let you set the cookie the normal way.