Naoray / laravel-goto-components

Quick jump to components
MIT License
13 stars 5 forks source link

Added support for anonymous index components. #5

Closed igorgaming closed 2 years ago

igorgaming commented 2 years ago

This PR adds support for anonymous index components that were released in Laravel v8.62.

This has also been tested with a similar structure such as:

components/
  foo/
    bar/
      index.blade.php
      foobar.index.php
    bar.blade.php

When using <x-foo.bar />, Laravel processes the file first foo/bar.blade.php therefore, this implementation also prioritizes these files and <x-foo.bar /> in this case will refer to foo/bar.blade.php

Without file foo/bar.blade.php: <x-foo.bar /> will refer to foo/bar/index.blade.php

Naoray commented 2 years ago

@IgorGaming thank you very much!