Skip to content

Give render function support for BackedEnum component names #715

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

Closed

Conversation

Harrald
Copy link

@Harrald Harrald commented Feb 13, 2025

enum PageComponentEnum: string 
{
    case Camera = 'camera';
}


// Make it possible to do this:
return Inertia::render(PageComponentEnum::Camera);

// Instead of this:
return Inertia::render('Camera');

@joetannenbaum
Copy link
Contributor

I'm not sure this is a common enough use case to merit adding the maintenance overhead, closing for now.

@Harrald
Copy link
Author

Harrald commented Apr 11, 2025

You can find this everywhere in Laravel. So i think it makes sense that the inertia Laravel adapter follows this convention. Right?

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