laravel-goto-view
laravel-goto-view copied to clipboard
Support for anonymous component paths.
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>
This may require some configuration, because this extension does not run php to find the view path.
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)