Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Backed enum support for @js #45862

Conversation

nuernbergerA
Copy link
Contributor

Current state of enum in @js

Given we have an defined enum:

enum Thing: string
{
    case SIMPLE = 'simple';
    //...
}

and pass it into @js

@js(Thing::SIMPLE)

Will output:

JSON.parse('\u0022simple\u0022')

After this PR

'simple'

@taylorotwell taylorotwell merged commit 4f98562 into laravel:9.x Jan 30, 2023
@nuernbergerA nuernbergerA deleted the feature/backed-enum-support-for-js-directive branch January 30, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants