Get the url from a liveview request

Hey everyone,

I want to get the lv request URL in :on_mount and I’m facing some issues.

Does anyone have any ideas?

Thanks! :smiley:

The URL is available in the handle_params callback that is invoked after mount: Phoenix.LiveView — Phoenix LiveView v1.2.5

Thanks a lot.

Using on_mount, you can attach_hook to the handle_params lifecycle callback and do your url handling there