Is there a way to use relative component paths when using blade

1 day ago 1
ARTICLE AD BOX

I am working on a fairly large project, and have a lot of components.
Those components are grouped in folders like so:

- views - components - bootstrap - navbar - navbar.blade.php - item.blade.php - menu - menu.blade.php - item.blade.php - divider.blade.php

To use those components I have to write quite the mouthful:

<x-bootstrap.navbar ... > <x-bootstrap.navbar.item ... /> <x-bootstrap.navbar.menu ... > <x-bootstrap.navbar.menu.item ... /> <x-bootstrap.navbar.menu.item ... /> <x-bootstrap.navbar.menu.divider/> <x-bootstrap.navbar.menu.item ... /> </x-bootstrap.navbar.menu> </x-bootstrap.navbar>

Is there a way to use those components in a relative way, so all I have to write is:

<x-bootstrap.navbar ... > <x-item ... /> <x-menu ... > <x-item ... /> <x-item ... /> <x-divider/> <x-item ... /> </x-menu> </x-bootstrap.navbar>

In other words is there a way to write just divider instead of whole bootstrap.navbar.menu.divider

Read Entire Article