Skip to content

Accessing the current local in form event listener #4590

Discussion options

You must be logged in to vote

You could do this:

$site = Statamic\Facades\Site::findByUrl(url()->previous())

It probably won't work if you're using a queued listener though.

Ideally, we'd pass the site in the event, like @jelleroorda said.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@duncanmcclean
Comment options

@simonbedard12
Comment options

Answer selected by simonbedard12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants