You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Laravel Documentation, blade components are nested using ".".
So a component with class app/View/Components/Buttons/Primary.php and view resources/views/components/buttons/primary.blade.php can be accessed as:
<x-buttons.primary />
When working on a package with blade components, you need to manually register the components. I released that the nested components were not using the "." but rather ":" for nesting.
Steps To Reproduce:
I manually registered a component like this in the app service provider
use Illuminate\Support\Facades\Blade;
use App\View\Components\Buttons\Primary;
public function boot()
{
Blade::components([
Primary::class
], 'sm');
}
And I could not access it with
<x-sm-buttons.primary />
But rather
<x-sm-buttons:primary />
My question is, is it intentional or a bug since nothing was said about it in the documentation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description:
In the Laravel Documentation, blade components are nested using ".".
So a component with class
app/View/Components/Buttons/Primary.php
and viewresources/views/components/buttons/primary.blade.php
can be accessed as:When working on a package with blade components, you need to manually register the components. I released that the nested components were not using the "." but rather ":" for nesting.
Steps To Reproduce:
I manually registered a component like this in the app service provider
And I could not access it with
But rather
My question is, is it intentional or a bug since nothing was said about it in the documentation.
Beta Was this translation helpful? Give feedback.
All reactions