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

Support for anonymous component paths. #68

Open
Waghabond opened this issue Mar 30, 2023 · 2 comments
Open

Support for anonymous component paths. #68

Waghabond opened this issue Mar 30, 2023 · 2 comments

Comments

@Waghabond
Copy link

Waghabond commented Mar 30, 2023

The extension should look in service providers' boot() methods for Blade::anonymousComponentPath() calls and highlight component tags accordingly

// app/Providers/AppServiceProvider.php
public function boot()
{
    Blade::anonymousComponentPath(resource_path('views/layouts'), 'layouts');
}
{{-- resources/views/layouts/app.blade.php --}}
<html>
    <head></head>
    <body>{{ $slot }}</body>
</html>

The following should now be clickable:

{{-- resources/views/home.blade.php --}}
<x-layouts::app>
    {{-- content --}}
</x-layouts::app>
@codingyu
Copy link
Owner

This may require some configuration, because this extension does not run php to find the view path.

@Waghabond
Copy link
Author

A setting that can map anonymous component paths in the extension's configuration would be perfectly sufficient! (at least for my use case. If it could happen "automagically" that would of course be even better)

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

No branches or pull requests

2 participants